Fix crash in Text Tool on double-click
Before this commit, if the user would double-click on the text shape while using a text tool, it would first show an editor with an empty text box, and then if the user does something else without changing the content (like Save, or switch to SVG) which would trigger conversion to shape or SVG, then Krita would crash. It was caused by double-click causing three events to be fired: - double-click - mouse release - another mouse release. In all three cases showEditor() would be called, including setInitialShape() function which is called inside. This commit fixes this behaviour by checking if the editor is already visible, and if yes, then not trying to set initial shape or show the editor since it's not necessary anymore. BUG:427858 (cherry picked from commit 9a791086)
Loading
Please register or sign in to comment