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;
+	}
 }