Buf fix https://bugs.kde.org/show_bug.cgi?id=325052
ClosedPublic

Authored by akapustin on Jul 18 2016, 11:05 PM.

Details

Test Plan

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

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
akapustin updated this revision to Diff 5288.Jul 18 2016, 11:05 PM
akapustin retitled this revision from to Buf fix https://bugs.kde.org/show_bug.cgi?id=325052.
akapustin updated this object.
akapustin edited the test plan for this revision. (Show Details)
akapustin added a reviewer: Krita.
akapustin set the repository for this revision to R37 Krita.
akapustin added a project: Krita.
Restricted Application added a subscriber: woltherav. · View Herald TranscriptJul 18 2016, 11:05 PM
akapustin edited the test plan for this revision. (Show Details)Jul 18 2016, 11:06 PM

The new mode works wrongly when you switch between a group and its children, especially, if the children are invisible and the parent layer is a *passthrough* layer.

Please use this file as a source:
http://www.peppercarrot.com/0_sources/0ther/misc/zip/2016-04-13_carrot-updating-or-repairing_by-David-Revoy.zip

And see this video showing the bug:
http://nonaynever.ru/pub/isolate_mode_bug.mp4

The bug happens because the topmost group layer is a passthrough layer. When isolated, it should be fully transparent. But when you switch over it, something wrong happens.

dkazakov requested changes to this revision.Jul 19 2016, 8:20 AM
dkazakov added a reviewer: dkazakov.
This revision now requires changes to proceed.Jul 19 2016, 8:20 AM
akapustin updated this revision to Diff 5297.Jul 19 2016, 11:16 AM
akapustin edited edge metadata.
dkazakov requested changes to this revision.Jul 20 2016, 7:23 AM
dkazakov edited edge metadata.

Hi, @akapustin!

The patch works almost fine now! The switching between any layers in isolated mode works fine. And it seems like there is no extra updates happen even!

The only trouble left is Alt+clicking on the layers. It still works, but sometimes generates artifacts:

For Alt+clicking check the code in KisNodeModel::setData(). It emits a signal toggleIsolateActiveNode(), which is connected to KisNodeManager::toggleIsolateActiveNode(). The rendering problem only happens when you Alt+click on a layer, which is not active at the moment.

If you cannot use Alt+click at all, please go into your window manager settings and disable Alt+Drag gesture for moving windows. At least on KDE it is enabled by default.

This revision now requires changes to proceed.Jul 20 2016, 7:23 AM
dkazakov added inline comments.Jul 20 2016, 7:24 AM
libs/ui/kis_node_manager.cpp
454

And please take care about indentation of lines :) There should be exactly 4 whitespaces, not 5 :)

This revision was automatically updated to reflect the committed changes.