Skip to content
Commit 56133bf7 authored by Agata Cacko's avatar Agata Cacko
Browse files

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)
parent 90a75b4b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment