summaryrefslogtreecommitdiff
path: root/muse2/muse/undo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/muse/undo.cpp')
-rw-r--r--muse2/muse/undo.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/muse2/muse/undo.cpp b/muse2/muse/undo.cpp
index c0191362..63911fcf 100644
--- a/muse2/muse/undo.cpp
+++ b/muse2/muse/undo.cpp
@@ -775,6 +775,7 @@ void Song::doRedo2()
UndoOp::UndoOp()
{
+ type=UndoOp::DoNothing;
}
UndoOp::UndoOp(UndoType type_)
@@ -1073,3 +1074,14 @@ 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;
+}