summaryrefslogtreecommitdiff
path: root/muse2/muse/undo.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-12-26 19:35:16 +0000
committerFlorian Jung <flo@windfisch.org>2011-12-26 19:35:16 +0000
commitb988a0a27bc175ce10bc8fa53ed131486813f3e7 (patch)
tree9bd59eda317e9979cffcaa0344f45120e8a6e7d2 /muse2/muse/undo.cpp
parent0d8e763949e498c1baf3a2fac7b0b3a406eb0068 (diff)
merged with release_2_0
Diffstat (limited to 'muse2/muse/undo.cpp')
-rw-r--r--muse2/muse/undo.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/muse2/muse/undo.cpp b/muse2/muse/undo.cpp
index 8587b108..06c190a2 100644
--- a/muse2/muse/undo.cpp
+++ b/muse2/muse/undo.cpp
@@ -789,6 +789,7 @@ void Song::doRedo2()
UndoOp::UndoOp()
{
+ type=UndoOp::DoNothing;
}
UndoOp::UndoOp(UndoType type_)
@@ -1087,4 +1088,16 @@ void Song::doRedo3()
dirty = true;
}
+
+bool Undo::empty() const
+{
+ if (std::list<UndoOp>::empty()) return true;
+
+ for (const_iterator it=begin(); it!=end(); it++)
+ if (it->type!=UndoOp::DoNothing)
+ return false;
+
+ return true;
+}
+
} // namespace MusECore