summaryrefslogtreecommitdiffstats
path: root/src/dialogs/layers-panel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dialogs/layers-panel.cpp')
-rw-r--r--src/dialogs/layers-panel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/dialogs/layers-panel.cpp b/src/dialogs/layers-panel.cpp
index 82def825c..e89e5050d 100644
--- a/src/dialogs/layers-panel.cpp
+++ b/src/dialogs/layers-panel.cpp
@@ -314,9 +314,13 @@ bool LayersPanel::_executeAction()
{
// Make sure selected layer hasn't changed since the action was triggered
if ( _pending
- && !( (_desktop && _desktop->currentLayer())
- && (_desktop->currentLayer() != _pending->_target)
- ) ) {
+ && (
+ (_pending->_actionCode == BUTTON_NEW)
+ || !( (_desktop && _desktop->currentLayer())
+ && (_desktop->currentLayer() != _pending->_target)
+ )
+ )
+ ) {
int val = _pending->_actionCode;
// SPObject* target = _pending->_target;