changeset 41:2b6412c1e724

* Further MainWindow -> Document refactoring
author Chris Cannam
date Wed, 08 Mar 2006 12:38:28 +0000
parents b2d1a61ab916
children 7bf163161b88
files base/CommandHistory.cpp base/Layer.h
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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<Model *>(const_cast<const Layer *>(this)->getModel());
+    }
+
     virtual const ZoomConstraint *getZoomConstraint() const { return 0; }
     virtual void paint(View *, QPainter &, QRect) const = 0;