Selaa lähdekoodia

fix focus problem

Laserlicht 2 vuotta sitten
vanhempi
sitoutus
f6843c0574
1 muutettua tiedostoa jossa 7 lisäystä ja 4 poistoa
  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;
+	}
 }