diff options
author | Florian Jung <flo@windfisch.org> | 2012-05-28 14:15:52 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2012-05-28 14:15:52 +0000 |
commit | d2a88cfaad5ac385fc3c6212c09ad7fbc38e9454 (patch) | |
tree | 387da0b38255003e1a971629ea0de32273ac3d3c /muse2/muse/undo.h | |
parent | 716f5a5b56a3b7ff59004ef0a1af5f98cb2a691c (diff) |
merged with release_2_0
Diffstat (limited to 'muse2/muse/undo.h')
-rw-r--r-- | muse2/muse/undo.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/muse2/muse/undo.h b/muse2/muse/undo.h index 3487da47..b88a9457 100644 --- a/muse2/muse/undo.h +++ b/muse2/muse/undo.h @@ -45,7 +45,7 @@ extern std::list<QString> temporaryWavFiles; //!< Used for storing all tmp-files struct UndoOp { enum UndoType { - AddTrack, DeleteTrack, ModifyTrack, + AddTrack, DeleteTrack, AddPart, DeletePart, ModifyPart, AddEvent, DeleteEvent, ModifyEvent, AddTempo, DeleteTempo, @@ -67,8 +67,7 @@ struct UndoOp { int c; }; struct { - Track* oTrack; - Track* nTrack; + Track* track; int trackno; }; struct { @@ -76,11 +75,7 @@ struct UndoOp { Part* nPart; }; struct { - Part* part; - }; - struct { - SigEvent* nSignature; - SigEvent* oSignature; + Part* part; // this part is only relevant for EVENT operations, NOT for part ops! }; struct { int channel; @@ -119,14 +114,12 @@ struct UndoOp { UndoOp(); UndoOp(UndoType type, int a, int b, int c=0); - UndoOp(UndoType type, int n, Track* oldTrack, Track* newTrack); UndoOp(UndoType type, int n, Track* track); UndoOp(UndoType type, Part* part); UndoOp(UndoType type, Event& oev, Event& nev, Part* part, bool doCtrls, bool doClones); UndoOp(UndoType type, Event& nev, Part* part, bool doCtrls, bool doClones); UndoOp(UndoType type, Part* oPart, Part* nPart, bool doCtrls, bool doClones); UndoOp(UndoType type, int c, int ctrl, int ov, int nv); - UndoOp(UndoType type, SigEvent* oevent, SigEvent* nevent); UndoOp(UndoType type, const char* changedFile, const char* changeData, int startframe, int endframe); UndoOp(UndoType type, Marker* copyMarker, Marker* realMarker); UndoOp(UndoType type, Track* track, const char* old_name, const char* new_name); @@ -143,11 +136,15 @@ typedef Undo::iterator iUndoOp; typedef Undo::reverse_iterator riUndoOp; class UndoList : public std::list<Undo> { + protected: + bool isUndo; public: void clearDelete(); + UndoList(bool _isUndo) : std::list<Undo>() { isUndo=_isUndo; } }; typedef UndoList::iterator iUndo; +typedef UndoList::reverse_iterator riUndo; } // namespace MusECore |