Mercurial > hg > svapp
comparison framework/Document.cpp @ 339:dd07d48d7d4f tonioni
Restore dormancy with layer
author | Chris Cannam |
---|---|
date | Tue, 01 Apr 2014 13:27:44 +0100 |
parents | 151b7c5864e3 |
children | 93cf23bfa1cb |
comparison
equal
deleted
inserted
replaced
336:3144af512ea3 | 339:dd07d48d7d4f |
---|---|
1191 View *view, | 1191 View *view, |
1192 Layer *layer) : | 1192 Layer *layer) : |
1193 m_d(d), | 1193 m_d(d), |
1194 m_view(view), | 1194 m_view(view), |
1195 m_layer(layer), | 1195 m_layer(layer), |
1196 m_wasDormant(layer->isLayerDormant(view)), | |
1196 m_name(qApp->translate("RemoveLayerCommand", "Delete %1 Layer").arg(layer->objectName())), | 1197 m_name(qApp->translate("RemoveLayerCommand", "Delete %1 Layer").arg(layer->objectName())), |
1197 m_added(true) | 1198 m_added(true) |
1198 { | 1199 { |
1199 } | 1200 } |
1200 | 1201 |
1244 | 1245 |
1245 void | 1246 void |
1246 Document::RemoveLayerCommand::unexecute() | 1247 Document::RemoveLayerCommand::unexecute() |
1247 { | 1248 { |
1248 m_view->addLayer(m_layer); | 1249 m_view->addLayer(m_layer); |
1249 m_layer->setLayerDormant(m_view, false); | 1250 m_layer->setLayerDormant(m_view, m_wasDormant); |
1250 | 1251 |
1251 m_d->addToLayerViewMap(m_layer, m_view); | 1252 m_d->addToLayerViewMap(m_layer, m_view); |
1252 m_added = true; | 1253 m_added = true; |
1253 } | 1254 } |
1254 | 1255 |