[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra/krita_locking_langkamp] krita/plugins/tools/tool_crop: improved locking in crop tool
From:       Sven Langkamp <sven.langkamp () gmail ! com>
Date:       2012-07-08 19:55:49
Message-ID: 20120708195549.4804EA60A6 () git ! kde ! org
[Download RAW message or body]

Git commit c5ec6be1f882452860d5ed8a1580afe86ab47633 by Sven Langkamp.
Committed on 08/07/2012 at 19:01.
Pushed by langkamp into branch 'krita_locking_langkamp'.

improved locking in crop tool

M  +4    -4    krita/plugins/tools/tool_crop/kis_tool_crop.cc

http://commits.kde.org/calligra/c5ec6be1f882452860d5ed8a1580afe86ab47633

diff --git a/krita/plugins/tools/tool_crop/kis_tool_crop.cc \
b/krita/plugins/tools/tool_crop/kis_tool_crop.cc index 8f91aa6..1409ffb 100644
--- a/krita/plugins/tools/tool_crop/kis_tool_crop.cc
+++ b/krita/plugins/tools/tool_crop/kis_tool_crop.cc
@@ -438,6 +438,10 @@ void KisToolCrop::paintOutlineWithHandles(QPainter& gc)
 
 void KisToolCrop::crop()
 {
+    if (!nodeEditable()) {
+        return;
+    }
+
     m_haveCropSelection = false;
     useCursor(cursor());
 
@@ -448,10 +452,6 @@ void KisToolCrop::crop()
 
     // The visitor adds the undo steps to the macro
     if (m_optWidget->cmbType->currentIndex() == 0 && currentNode()->paintDevice()) {
-        if (!nodeEditable()) {
-            return;
-        }
-
         currentImage()->cropNode(currentNode(), cropRect);
     } else {
         currentImage()->cropImage(cropRect);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic