Diffusion Krita 5215befc243d

Fix activation of Isolate Mode when merging the layers down

Authored by dkazakov on Apr 3 2019, 9:39 AM.

Description

Fix activation of Isolate Mode when merging the layers down

When merging layers down, a null layer is activated for a short
period of time. It happens because the following:

  1. When we remove the top layer, LayerBox adjusts the currently

selected index to the lower node. And tries to activate it.

  1. The activated node is passed further by the signals chain,

and then in KisNodeManager::slotNonUiActivatedNode() we find
out that this node has also been removed from the node graph.
Therefore we pass 0 to the lower-level code.

  1. Isolate mode code sees that there is no layer selected and

stops the isolated mode.

The patch fixes the issue by storing a separate flag, marking
marking the presence of isolated mode. Even when there is no
layer to isolate, we still save the sate and try to activate
it when a valid node comes.

The patch also disables automated switch-off of the isolated mode
hen adding/removing. The mode will continue until the user switches
it off manually (or something really weird happens)

BUG:395981

Details

Committed
dkazakovApr 3 2019, 9:41 AM
Parents
R37:3d29280681be: Fix internal id of the layerbox docker
Branches
Unknown
Tags
Unknown