From 56a1bf211a8a67436df1a898b456639f69f04c06 Mon Sep 17 00:00:00 2001 From: joncruz Date: Mon, 5 Jun 2006 08:10:41 +0000 Subject: [PATCH] Allow "new layer" action when no layer selected --- ChangeLog | 9 ++++++++- src/dialogs/layers-panel.cpp | 10 +++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index bcf3baae6..38d217201 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-06-02 Jon A. Cruz + + * src/dialogs/layers-panel.cpp: + + Allow action when no layer selected. + Fixes bugs #1494646. + 2006-06-02 Jon A. Cruz * trace/siox.cpp: @@ -9,7 +16,7 @@ * src/dialogs/layers-panel.h, src/dialogs/layers-panel.cpp: Blocked signal when changes are not from the layers UI. - Fixes bug #1495406. + Fixes bugs #1495406 and most of #1494646. 2006-06-02 Colin Marquardt 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; -- 2.30.2