Code

Allow "new layer" action when no layer selected
authorjoncruz <joncruz@users.sourceforge.net>
Mon, 5 Jun 2006 08:10:41 +0000 (08:10 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Mon, 5 Jun 2006 08:10:41 +0000 (08:10 +0000)
ChangeLog
src/dialogs/layers-panel.cpp

index bcf3baae6930a3851ab5214c29ae5abf45b8dfe3..38d21720179c24573e96811e05078f768f61175e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-06-02  Jon A. Cruz  <jon@joncruz.org>
+
+       * src/dialogs/layers-panel.cpp:
+
+         Allow action when no layer selected.
+         Fixes bugs #1494646.
+
 2006-06-02  Jon A. Cruz  <jon@joncruz.org>
 
        * 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  <colin@marquardt-home.de>
 
index 82def825cd2f1bb1ee1fa255967a5d2d68df91c0..e89e5050d8bd0166a6f792edbd77d0d2fdb8de12 100644 (file)
@@ -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;