Bug 411981 - Node::setCollapsed doesn't collapse group layers visibly
Summary: Node::setCollapsed doesn't collapse group layers visibly
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (show other bugs)
Version: 4.2.6
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: vanyossi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-16 20:40 UTC by Larpon
Modified: 2019-10-03 12:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Larpon 2019-09-16 20:40:37 UTC
SUMMARY

When using the method "setCollapsed()" on the Node type it's not reflected visibly in the Layer tree docker.
https://api.kde.org/extragear-api/graphics-apidocs/krita/libs/libkis/html/classNode.html#a0ec780c17a196114303fdce2367fea15

STEPS TO REPRODUCE
1. Find a groupLayer node in the document via the python scripting API
2. call setCollapsed on it

OBSERVED RESULT
(Group) Layer doesn't change state

EXPECTED RESULT
(Group) Layer should visibly collapse or open in the layer tree


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 18.04 / backports
KDE Plasma Version: 5.12.9
KDE Frameworks Version: 5.47.0
Qt Version: 5.9.5
Comment 1 vanyossi 2019-09-18 05:08:14 UTC
I can confirm this bug, and have a patch almost ready for fixing it.
Comment 2 vanyossi 2019-09-24 02:41:07 UTC
Git commit a54d7c05f281d3a99423ed79f416ef53a69dc138 by Ivan Yossi.
Committed on 24/09/2019 at 02:41.
Pushed by ivany into branch 'master'.

Fix Collapse state not updating after Python call

Added a proper callback signal from node_base and make
kis_image emit the correct signal if changed.

M  +6    -0    libs/image/kis_base_node.cpp
M  +10   -0    libs/image/kis_base_node.h
M  +2    -1    libs/image/kis_image.cc
M  +1    -5    libs/image/kis_image.h
M  +0    -1    libs/image/kis_layer_composition.cpp
M  +7    -0    libs/image/kis_node.cpp
M  +1    -0    libs/image/kis_node.h
M  +4    -0    libs/image/kis_node_graph_listener.cpp
M  +2    -0    libs/image/kis_node_graph_listener.h

https://invent.kde.org/kde/krita/commit/a54d7c05f281d3a99423ed79f416ef53a69dc138
Comment 3 Halla Rempt 2019-10-03 12:26:36 UTC
Git commit 082355ebc700dc54ff50811a146bca24a2165888 by Boudewijn Rempt, on behalf of Ivan Yossi.
Committed on 03/10/2019 at 12:26.
Pushed by rempt into branch 'krita/4.2'.

Fix Collapse state not updating after Python call

Added a proper callback signal from node_base and make
kis_image emit the correct signal if changed.

M  +6    -0    libs/image/kis_base_node.cpp
M  +10   -0    libs/image/kis_base_node.h
M  +2    -1    libs/image/kis_image.cc
M  +1    -5    libs/image/kis_image.h
M  +0    -1    libs/image/kis_layer_composition.cpp
M  +7    -0    libs/image/kis_node.cpp
M  +1    -0    libs/image/kis_node.h
M  +4    -0    libs/image/kis_node_graph_listener.cpp
M  +2    -0    libs/image/kis_node_graph_listener.h

https://invent.kde.org/kde/krita/commit/082355ebc700dc54ff50811a146bca24a2165888