Laserlicht преди 2 години
родител
ревизия
f6843c0574
променени са 1 файла, в които са добавени 7 реда и са изтрити 4 реда
  1. 7 4
      client/widgets/TextControls.cpp

+ 7 - 4
client/widgets/TextControls.cpp

@@ -809,9 +809,12 @@ void CFocusable::moveFocus()
 
 void CFocusable::removeFocus()
 {
-	focus = false;
-	focusListener->focusLost();
-	redraw();
+	if(this == inputWithFocus)
+	{
+		focus = false;
+		focusListener->focusLost();
+		redraw();
 
-	inputWithFocus = nullptr;
+		inputWithFocus = nullptr;
+	}
 }