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

List:       kde-commits
Subject:    [calligra] krita/plugins/extensions/dockers/defaultdockers: Probably fix a crash for Animtim
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2012-03-02 18:52:35
Message-ID: 20120302185235.BB1D1A60B9 () git ! kde ! org
[Download RAW message or body]

Git commit 60e0328155cd3266f8bbe1de1b7eda03f41b2291 by Dmitry Kazakov.
Committed on 02/03/2012 at 20:52.
Pushed by dkazakov into branch 'master'.

Probably fix a crash for Animtim

This was an old piece of code. Now we cannot select more than one layer
so there is no need to deal with lists.

CCBUG:295185

M  +2    -12   krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp

http://commits.kde.org/calligra/60e0328155cd3266f8bbe1de1b7eda03f41b2291

diff --git a/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp \
b/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp index \
                89a870f..87ad14a 100644
--- a/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp
+++ b/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp
@@ -483,18 +483,8 @@ void KisLayerBox::slotRmClicked()
 {
     if(!m_canvas) return;
 
-    QModelIndexList l = \
                m_wdgLayerBox->listLayers->selectionModel()->selectedIndexes();
-    if (l.count() < 2 && m_nodeManager->activeNode() && \
                !l.contains(m_wdgLayerBox->listLayers->currentIndex())) {
-        l.clear();
-        l.append(m_wdgLayerBox->listLayers->currentIndex());
-    }
-
-    for (int i = 0, n = l.count(); i < n; ++i) {
-        KisNodeSP node = m_nodeModel->nodeFromIndex(l.at(i));
-        if (!node->systemLocked()) {
-            m_nodeManager->removeNode(node);
-        }
-    }
+    KisNodeSP node = m_nodeManager->activeNode();
+    m_nodeManager->removeNode(node);
 }
 
 void KisLayerBox::slotRaiseClicked()


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

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