Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color swatches do not update after using replace command. #1055

Closed
6 of 8 tasks
Jose-Moreno opened this issue Aug 31, 2018 · 4 comments · Fixed by #1265
Closed
6 of 8 tasks

Color swatches do not update after using replace command. #1055

Jose-Moreno opened this issue Aug 31, 2018 · 4 comments · Fixed by #1265

Comments

@Jose-Moreno
Copy link
Member

Jose-Moreno commented Aug 31, 2018

--Issue Summary--

Ok so when using vector layers when you change a color it's value updates but the thumbnail doesn't. se Using the "replace" command updates the swatch color value and thumbnail but not it's name.

However when a bitmap layer is active the palette behaves a bit differently.

You can change the color locally, and while the value changes the thumbnail doesn't update, but once you select a different swatch the value of the swatch itself returns to a previous value. Using the replace command does not update the swatch color value, its name, but it does update its thumbnail.

25-SEP-2018: Changing between List mode and Grid mode and changing swatch size, updates the thumbnail and the swatch value back to the previous color value in Bitmap layers. Tested on RC1 commit: 2a384fb

Related to #943 using the replace command on the first swatch of the palette modifies the color but not the thumbnail in vector, but doesn't change anything for bitmap layers.

Discussion:
It seems not updating the swatch thumbnail when modifying a color with the wheel/ inspector was implemented recently and is intended to avoid unwanted changes to the color, however I've noticed that the vector layer does not respect the "replace" command philosophy as you can permanently change the color without using such command. Ideally this functionality should be consistent on both layer types.

--Expected Results--

The replace command should properly update all the noted properties and values (the generated name is debatable but still..) and its use should be consistent on either layer type.

Vector

  • Replace command should update:
    • Color
    • Thumbnail (Not the first swatch)
    • Generated Name

Bitmap

  • Replace command should update:
    • Color
    • Thumbnail
    • Generated Name
  • Fix: Changing list mode does not change back modified swatch color value + thumbnail
  • Fix: Changing swatch size does not change back modified swatch color value + thumbnail

--Video or Image Reference--

Will record a video soon.

--Steps to reproduce--

Will update later.

--System Information--

  • Pencil2D Version:
    Version: 0.6.1.1
    commit: 0a2c87b
    date: 2018-08-20_11:39:21
    Development build
    Operating System: Windows 7 SP 1 (6.1)
    CPU Architecture: x86_64
@chchwy
Copy link
Member

chchwy commented Sep 17, 2018

The first colour of palette never updating has been fixed.

@Jose-Moreno
Copy link
Member Author

Update 03/06/2019

With 0.6.4 changing the color on the vector layer in real-time (color widgets), no longer updates the swatches until the display mode is changed between either list or grid. Using the replace command does change the thumbnail.

Am i to understand that we are going to suggest our users not to update their vector palette in real time, pretty much like the bitmap palette, instead forcing them to replace the color? If so, that's fine, but then we should unify the behavior for both palette types.

Related to #943 All the swatches along with the first refuse to update the RGB color when using the replace command

@davidlamhauge davidlamhauge self-assigned this Sep 16, 2019
MrStevns added a commit to MrStevns/pencil that referenced this issue Sep 26, 2021
…vector strokes

- Ensures that only by explicitly using the 'replace' command, attached vector strokes will change
- Fixes a bug that would detach a vector stroke from the palette
MrStevns added a commit that referenced this issue Aug 18, 2022
* Update swatches after Replace command

* Moved function and added realtime swatch update

* Fix deleting swatch could result in stroke not being bound to a color index anymore

* #1055 - Color palette widget should not automatically update vector strokes

- Ensures that only by explicitly using the 'replace' command, attached vector strokes will change
- Fixes a bug that would detach a vector stroke from the palette

* Remove unused

Co-authored-by: MrStevns <CandyFace18@gmail.com>
@Jose-Moreno
Copy link
Member Author

@Jose-Moreno Reminder to test these issues after #1265 was merged. If any was not fixed I'll open a new issue for that specific problem instead.

@Jose-Moreno
Copy link
Member Author

Alright. I've tested this. It's working as expected. Thanks!

I'm still missing the generated name change when replacing a color but I'll add that separately as a wish list feature request instead of part of a bug report.

What I'd take as expected behavior in that case, is that if the name has not been changed, the replace command can invoke the name generator to update the color string, else if the name has been modified in anyway, then it shouldn't run to avoid changing the personalized name (current behavior).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants