Skip to content

fix: color/gradient dialog edits the parameter that opened itself - #3373

Merged
ice0 merged 3 commits into
synfig:masterfrom
rodolforg:fix-3288
Oct 20, 2024
Merged

ice0 merged 3 commits into
synfig:masterfrom
rodolforg:fix-3288

Conversation

@rodolforg

Copy link
Copy Markdown
Contributor

Here we prevent to emit signal_edited_ for Color and Gradient dialog
windows when presented by Parameter Panel.

Those dialogs may be opened by a cell and try to update the parameter
value related to another one, as it just remembered its parameter tree
path.

Reproducible steps:

  1. Create a region layer
  2. Create an outline layer
  3. Click on color parameter to edit it
  4. Without closing color dialog, select the region layer instead
  5. Try to edit the color in dialog
  6. Error Message appears

fix #3288

@rodolforg

Copy link
Copy Markdown
Contributor Author

If a 1.4.6 will ever be released, backport this PR.

@ice0

ice0 commented Jun 14, 2024

Copy link
Copy Markdown
Collaborator

I do not know if this is important, but it changes the current behavior:

Before:

color-before.mp4

After:

color-after.mp4

@rodolforg

rodolforg commented Jun 14, 2024 •

Copy link
Copy Markdown
Contributor Author

It works like that before just by coincidence: there is a layer parameter of color type value at same tree path.
If you have a region layer and an outline layer, the steps you did won't work at all.

ice0
ice0 previously approved these changes Oct 19, 2024
Here we prevent to emit signal_edited_ for Color and Gradient dialog
windows when presented by Parameter Panel.

Those dialogs may be opened by a cell and try to update the parameter
value related to another one, as it just remembered its parameter tree
path.

Reproducible steps:
1. Create a region layer
2. Create an outline layer
3. Click on color parameter to edit it
4. Without closing color dialog, select the region layer instead
5. Try to edit the color in dialog
6. Error Message appears

fix synfig#3288
`protected` instead of `public`
If user opens Color dialog for editing a layer parameter,
deletes this layer while Color dialog is still open and
keep using the dialog for color changing, the Undo history
is filled with useless color changes...
@ice0
ice0 merged commit 483b5ed into synfig:master Oct 20, 2024
@ice0

ice0 commented Oct 20, 2024

Copy link
Copy Markdown
Collaborator

Merged. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite Error Windows from Eyedropper

2 participants