Explorar o código

Fix toggle mode of BaseButton.

..which got broken with #11480.
Ferenc Arn %!s(int64=8) %!d(string=hai) anos
pai
achega
9c516d8383
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      scene/gui/base_button.cpp

+ 3 - 1
scene/gui/base_button.cpp

@@ -39,7 +39,9 @@ void BaseButton::_unpress_group() {
 	if (!button_group.is_valid())
 		return;
 
-	status.pressed = false;
+	if (toggle_mode) {
+		status.pressed = true;
+	}
 
 	for (Set<BaseButton *>::Element *E = button_group->buttons.front(); E; E = E->next()) {
 		if (E->get() == this)