diff --git a/editor/syncdocument.h b/editor/syncdocument.h index 3304f28..dbc13c5 100644 --- a/editor/syncdocument.h +++ b/editor/syncdocument.h @@ -206,8 +206,8 @@ public: virtual void undo(SyncDocument *data) { - std::list::iterator it; - for (it = commands.begin(); it != commands.end(); ++it) (*it)->undo(data); + std::list::reverse_iterator it; + for (it = commands.rbegin(); it != commands.rend(); ++it) (*it)->undo(data); } private: