Repository navigation
[Synfig Studio] Minor cleanup on LayerTree - #1979
Conversation
|
Of course, it could/should be squashed before merge. |
|
Maybe it helps #525 too |
177db01 to
4951d7f
Compare
|
To be clear: this PR solves the problem mentioned by @Jose-Moreno here: https://youtu.be/A3D3mSo3ff0?t=579 |
@rodolforg Does it solve it or just hides because of faster speed? I tried to reproduce the problem using @Jose-Moreno captured mouse clicks and was able to reproduce it with the stable 1.4.0 version. Unfortunately when I build debug version I cannot reproduce the problem because I have a different GTK version on my local machine, and the GUI is slightly different so script just clicks on wrong places. P.S. I assume that Synfig crashes when some exception occurred inside signal handler. |
|
I didn't say it solves the crash ;) At that specific time on the video, he pointed the strange delay when we move a layer up/down. That's what I fixed. |
Ok. I want to ask @Jose-Moreno for help again. After that I will merge this PR. |
|
@ice0 @rodolforg Hey. I've been reading your messages today. I'll gladly test Synfig once you review the other issue and merge any patches. 💪 Regarding this PR I'll test it as well later on when a dev build has been made as I can't currently spare time to setup the compilation environment required for Synfig 😅 |
Hey @Jose-Moreno ! you can test any PR on Windows. Just follow the steps described here: https://synfig.readthedocs.io/en/latest/how_to_help/testing_prs.html IIRC you'll need the release package extracted in a folder, and overwrite it. |
I will prepare all the necessary binaries for you :) |
4951d7f to
ef37687
Compare
|
Merged. Thank you! |
together with 2 previous commits
together with 2 previous commits
together with 2 previous commits
together with 2 previous commits
together with 2 previous commits
LayerTree is a fake widget. Its goal is to provide the (real) layer and parameter TreeViews. It isn't supposed to add it to any dialog or container. However, it contains deprecated and unused widgets from the time it was a real "widget".
I removed its unused/invisible/useless inner widgets and their signal handling. It speeds up a lot the layer movements by drag'n drop. For example,
studio::LayerTree::on_blend_method_changed()was called at least 24 times while dragging a layer row in the Layer Panel.After that, I saw
on_dirty_preview()was empty and it wouldn't make sense to update neither Layer nor Parameter Panels ifCanvasInterfaceemits this signal:LayerTreeStorealready monitors layer changes (adding/removing/raising/lowering/…) Therefore, I removedon_dirty_preview()too.Finally,
quick_layerwas a variable only used in theon_dirty_preview(), but, as everything there, it was commented out. So I deleted it too.We can clean it up more: split into a real LayerTree and an isolated (ie, in other file) ParamTree. But I thought it would a big change to backport it to 1.4.1 if I did more.
This PR was inspired by Jose-Moreno comments in #540 (comment) and speeds up layer drag'n drop.