# HG changeset patch # User Chris Cannam # Date 1141821508 0 # Node ID 2b6412c1e724c202ccbde2c66766a4655b92fdc8 # Parent b2d1a61ab916dbc7adcf622bc2b31f113f3b59ef * Further MainWindow -> Document refactoring diff -r b2d1a61ab916 -r 2b6412c1e724 base/CommandHistory.cpp --- a/base/CommandHistory.cpp Mon Mar 06 17:20:25 2006 +0000 +++ b/base/CommandHistory.cpp Wed Mar 08 12:38:28 2006 +0000 @@ -174,6 +174,8 @@ // no need to clip updateActions(); + + if ((int)m_undoStack.size() == m_savedAt) emit documentRestored(); } void diff -r b2d1a61ab916 -r 2b6412c1e724 base/Layer.h --- a/base/Layer.h Mon Mar 06 17:20:25 2006 +0000 +++ b/base/Layer.h Wed Mar 08 12:38:28 2006 +0000 @@ -43,6 +43,10 @@ virtual ~Layer(); virtual const Model *getModel() const = 0; + virtual Model *getModel() { + return const_cast(const_cast(this)->getModel()); + } + virtual const ZoomConstraint *getZoomConstraint() const { return 0; } virtual void paint(View *, QPainter &, QRect) const = 0;