[krita] libs/ui: FEATURE: Don't exit Isolate Layer mode when switching layer

Dmitry Kazakov dimula73 at gmail.com
Fri Jul 22 09:45:28 UTC 2016


Git commit f6b1c94cca22f854982afcb9031ac6580c463054 by Dmitry Kazakov, on behalf of Alexey Kapustin.
Committed on 22/07/2016 at 09:45.
Pushed by dkazakov into branch 'master'.

FEATURE: Don't exit Isolate Layer mode when switching layer

Isolation mode is now saved when you move between layers.
When moving to a higher layer level , all the sub-layers are visible.

Now to exit Isolate Layer you can either toggle the checkbox in
a context menu or just Alt+click on the currently selected layer.

Reviewers: #krita, dkazakov
Subscribers: dkazakov, woltherav
Tags: #krita
Differential Revision: https://phabricator.kde.org/D2213
CC:kimageshop at kde.org
BUG:325052

M  +1    -14   libs/ui/kis_node_manager.cpp

http://commits.kde.org/krita/f6b1c94cca22f854982afcb9031ac6580c463054

diff --git a/libs/ui/kis_node_manager.cpp b/libs/ui/kis_node_manager.cpp
index e75297f..ba3608d 100644
--- a/libs/ui/kis_node_manager.cpp
+++ b/libs/ui/kis_node_manager.cpp
@@ -452,20 +452,7 @@ void KisNodeManager::slotTryFinishIsolatedMode()
     KisNodeSP isolatedRootNode = m_d->view->image()->isolatedModeRoot();
     if (!isolatedRootNode) return;
 
-    bool belongsToIsolatedGroup = false;
-
-    KisNodeSP node = this->activeNode();
-    while(node) {
-        if (node == isolatedRootNode) {
-            belongsToIsolatedGroup = true;
-            break;
-        }
-        node = node->parent();
-    }
-
-    if (!belongsToIsolatedGroup) {
-        m_d->view->image()->stopIsolatedMode();
-    }
+    this->toggleIsolateMode(true);
 }
 
 void KisNodeManager::createNode(const QString & nodeType, bool quiet, KisPaintDeviceSP copyFrom)


More information about the kimageshop mailing list