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

List:       kde-commits
Subject:    koffice/krita/core
From:       Bart Coppens <kde () bartcoppens ! be>
Date:       2006-03-23 0:10:13
Message-ID: 1143072613.988261.29598.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 521615 by coppens:

There is something very weird going on there, causing when redoing a remove (either \
as part of a redo remove, or undo create), that the activeLayer becomes NULL! Prevent \
that. (But I'd like to have the layers signal people to maybe have a closer look at \
it? It works for now, but this might be working around another issue...)

 M  +4 -0      kis_image.cc  


--- trunk/koffice/krita/core/kis_image.cc #521614:521615
@@ -1142,6 +1142,8 @@
         KisLayerSP wasAbove = layer->nextSibling();
         KisLayerSP wasBelow = layer->prevSibling();
         const bool wasActive = layer == activeLayer();
+        // sigLayerRemoved can set it to 0, we don't want that in the else of \
wasActive! +        KisLayerSP actLayer = activeLayer();
         const bool success = parent->removeLayer(layer);
         if (success) {
             layer->setImage(0);
@@ -1159,6 +1161,8 @@
                         activate(parent.data());
                     else
                         activate(rootLayer()->firstChild());
+                } else {
+                    activate(actLayer);
                 }
             }
         }


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

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