From b6bdcd264f82439035ac8b51d5e3e466f168f0d1 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 20 Oct 2008 00:48:37 +0000 Subject: [PATCH] undo should be applied backwards... --- editor/syncdocument.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: