Skip to content

Fix crash when pasting font family in TextEditor

Dmitry Kazakov requested to merge work/cherry-pick-49dc9e05 into krita/5.2

Problem:

Pasting a new font famyly and hitting Save or Discard while the FontFamilyComboBox is still in editing focus crashes. After pasting font family, the font is also not applied until you press enter or change focus.

Solution:

Write the validator of the font familyies. Validator is triggered whenever the text is changed (including pasting), and if font famyly is correct, the font changes immediately. So, there are no conditions that provoke a crash.

BUG:484066

(cherry picked from commit 49dc9e05)

6762569e Fix crash when pasting font family in TextEditor 86af950d Fix crash when pasting font family in TextEditor 4dd9100b Fix crash when pasting font family in TextEditor

Merge request reports