Skip to content

Fix: Enable Shift + Click to show only current layer

Ivan Yossi requested to merge ivany/krita:376086_ShiftClick into master

Original discussion: Differential Revision: https://phabricator.kde.org/D20591

BUG:376086

This patch fixes shift + Click using isInStasis property for nodes, allowing to keep a state for each image on same instance different window / tab, or different instances. It keeps control off nodes from the root of each individual tree.

Replaces former toggleProperty.

Adds two shift functions when clicking eye:

Shift + Click: Hide all but clicked layer.

  • Clicking a group will make all layers in that group to go visible, a second shift click returns to previous state.
  • Shift + Control + Click: Hide all but clicked layer in context (hiding only affects siblings)
  • Clicking a group will hide all siblings and leave childs intact for review.

@dkazakov

  1. Any normal click on another eye, or current eye, looses the state. This is by design. It is assumed that editing the visibility manually means they want to alter the state of the document.
  2. Shift + Click is a toggle, second shift + click on any layer restores previous state.
  3. Each document, on each window tab or instance, retains their state independently
  4. Depends.
  • Adding new layers reset state: this is because the mangle with the state of the tree, And could potentially set the node in a confused view state. So after new layer, we create new state.
  • Deleteing a layer preserves state. This coulb be useful to review and remove layers or groups.

This is different than isolate layer as it work on groups and on indivuual contextualized isolation. (Shift + Control)

Are the shortcuts selected ok?

Edited by Ivan Yossi

Merge request reports

Loading