- Use a NotifyLock instead of (History|Simulation)::set_notify_enabled() method, which is more elegant and also exception-safe

- Delete set_notify_enabled() method from ConcreteHistory; it was both wrong and useless, and caused impredictable behaviour!
- Don't make some methods of History and Simulation virtual if we don't want the user to override them
- Loading from file and jumping to an instant of the simulation should be much quickier now

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1170 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-09-15 09:34:12 +00:00
parent 737324f250
commit 83b655496f
11 changed files with 94 additions and 73 deletions

View file

@ -70,7 +70,7 @@ void XMLSerializer::restore_snapshot(const Glib::ustring& filename, History& his
// DEBUG - remove me when finished
// disable notifications over history until the end of this method
bool was_enabled = hist.set_notify_enabled(false);
History::LockNotify h_lock(hist);
#ifdef LIBXML_SAX1_ENABLED
xmlDocPtr doc;
@ -107,8 +107,6 @@ void XMLSerializer::restore_snapshot(const Glib::ustring& filename, History& his
#error Compilation of LIBXML with SAX1 support must be enabled
#endif /* LIBXML_SAX1_ENABLED */
// Re-enable notifications over history observers
hist.set_notify_enabled(was_enabled);
}