Преглед изворни кода

LibGUI: Clear inactive selections in DisplayOnly TextEditors

thankyouverycool пре 4 година
родитељ
комит
bc26d1093f
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      Userland/Libraries/LibGUI/TextEditor.cpp

+ 2 - 0
Userland/Libraries/LibGUI/TextEditor.cpp

@@ -1133,6 +1133,8 @@ void TextEditor::focusin_event(FocusEvent& event)
 
 
 void TextEditor::focusout_event(FocusEvent&)
 void TextEditor::focusout_event(FocusEvent&)
 {
 {
+    if (is_displayonly() && has_selection())
+        m_selection.clear();
     stop_timer();
     stop_timer();
     if (on_focusout)
     if (on_focusout)
         on_focusout();
         on_focusout();