Fix unexpected interactions of text tool#1176
Conversation
This reverts commit bc8914b.
…ePrimaryColorChanged if State is NotFinalized
|
Thanks for looking at this! finalize_issue.mp4 |
|
It seems I misunderstood. I have since then been looking into the text tool behaving strangely on startup but I did not find what was causing the inconsistent behaviour. I reverted the change to not finalize text when using another tool, so currently this pull request only fixes the problem of the text suddenly switching colors when switching to another tool and changing color before using that tool. |
|
Actually I think that code block you were removing might hint at the startup issue - that LayerCloned event handler is only added if there is an open document when the text tool is activated, but on startup perhaps the text tool is activated before the default empty document? |
|
I've committed a fix for the finalization issue in 8deeaf9, so I'll merge these changes for the colours now. Thanks for working on this!! |
Fixes #1097
Moved the color objects used for drawing text to the CurrentTextEngine and then only updating those colors when the color palette changes while the text tool is selected.
Removed FinalizeText on surface cloning. This seems to be the code that caused finalizations of text when using another tool. The text seems to finalize properly now, but I am not completely sure why the code was there to begin with, so this might have subtly broke something.