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

Fix #1422710, 1422715 - Fix use of Recolor tool after use of Editable sh... #88

Merged
merged 2 commits into from Feb 19, 2015

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Feb 18, 2015

...ape.

The issue is that Recolor temporarily draws on the ToolLayer, which it expects to be invisible. Editable shapes make the ToolLayer visible when activated but never hides it, so the Recolor tool's temporary work is visible. Fix by hiding the tool layer when an editable tool finalized all its shapes. Doing it on tool deactivation misses a case where you switch to a new image and then change the tool.

… shape.

The issue is that Recolor temporarily draws on the ToolLayer, which it expects to be invisible.  Editable shapes make the ToolLayer visible when activated but never hides it, so the Recolor tool's temporary works is visible.  Fix by hiding the tool layer when an editable tool finalized all its shapes.  Doing it on tool deactivation misses a case where you switch to a new image and then change the tool.
@cameronwhite
Copy link
Member

If I do Recolor -> Line/Curve -> Recolor, and then undo 3 times, the last Recolor operation appears again. Maybe the Recolor tool needs to clear out the ToolLayer when it's done with it?

@jpobst
Copy link
Contributor Author

jpobst commented Feb 18, 2015

I think any user of the ToolLayer is supposed to manage its own usage of it, which is:

  • Turning it on and off when activated/deactivated.
  • If you turn it on, managing what the content is.

So I think the proper way to do this is the Editable shapes tool needs to clear it when it wants to turn it on. (Or else we will just hit this again if a 3rd party Add-In tool leaves work on the ToolLayer.)

@jpobst
Copy link
Contributor Author

jpobst commented Feb 18, 2015

Fixed the edit engine to always clear the ToolLayer before using it.

…by the edit engine, because it might have been changed by another tool. Fortunately Clear should be a relatively cheap operation.
cameronwhite added a commit that referenced this pull request Feb 19, 2015
Fix #1422710, 1422715 - Fix use of Recolor tool after use of Editable sh...
@cameronwhite cameronwhite merged commit a68512c into PintaProject:master Feb 19, 2015
@jpobst jpobst deleted the bug-1422710 branch February 20, 2015 02:06
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.

None yet

2 participants