changeset 340:c11701af6bb4 tony_integration

Merge from branch tonioni
author Chris Cannam
date Wed, 02 Apr 2014 08:51:51 +0100
parents b2ca08d16293 (current diff) dd07d48d7d4f (diff)
children a4b8f0864835
files
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/framework/Document.cpp	Tue Mar 11 17:35:02 2014 +0000
+++ b/framework/Document.cpp	Wed Apr 02 08:51:51 2014 +0100
@@ -1193,6 +1193,7 @@
     m_d(d),
     m_view(view),
     m_layer(layer),
+    m_wasDormant(layer->isLayerDormant(view)),
     m_name(qApp->translate("RemoveLayerCommand", "Delete %1 Layer").arg(layer->objectName())),
     m_added(true)
 {
@@ -1246,7 +1247,7 @@
 Document::RemoveLayerCommand::unexecute()
 {
     m_view->addLayer(m_layer);
-    m_layer->setLayerDormant(m_view, false);
+    m_layer->setLayerDormant(m_view, m_wasDormant);
 
     m_d->addToLayerViewMap(m_layer, m_view);
     m_added = true;
--- a/framework/Document.h	Tue Mar 11 17:35:02 2014 +0000
+++ b/framework/Document.h	Wed Apr 02 08:51:51 2014 +0100
@@ -377,6 +377,7 @@
 	Document *m_d;
 	View *m_view; // I don't own this
 	Layer *m_layer; // Document owns this, but I determine its lifespan
+        bool m_wasDormant;
 	QString m_name;
 	bool m_added;
     };