liquify: weird behavior when clicking several buttons in a row
Steps to reproduce:
- Open the liquify module
- Click "point tool"
- Click "line tool"
The point tool is deactivated, the line tool is activated instead.
The point tool icon is still shown as activated, the line tool is, too. However, none of the tool is really active, one can't draw anything one the image while in this state.
Trying to fix the situation by disabling and re-enabling the module only makes things worse: I got to a state where I could not re-activate any tool without restarting dt.
I guess we need something similar to the
dt_iop_color_picker_reset() we have to disable a color picker when we pick another one.
liquify: fix tool buttons handling.
When a line or curve is not yet started it is possible to change the
tool by clicking on the corresponding button. when a line or curve
is started it needs to be finished before selecting about tool.
This fixes bad behavior and crashes and is a nice usability fix.
#1 Updated by Pascal Obry 10 months ago
This is a very delicate part as one of the node is active in a temp section to be able to display it. So I guess we need to remove it and re-create a new one for the new selected tool. I didn't look at the actual code and don't remember all details but I suppose today we recreate a new temp node without removing the current one which is probably still in the array of node...