From b988a0a27bc175ce10bc8fa53ed131486813f3e7 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Mon, 26 Dec 2011 19:35:16 +0000 Subject: merged with release_2_0 --- muse2/muse/undo.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'muse2/muse/undo.cpp') 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::empty()) return true; + + for (const_iterator it=begin(); it!=end(); it++) + if (it->type!=UndoOp::DoNothing) + return false; + + return true; +} + } // namespace MusECore -- cgit v1.2.3