Sfoglia il codice sorgente

Prevent to uncheck selected item with button group

volzhs 8 anni fa
parent
commit
706ca4efd6
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      scene/gui/base_button.cpp

+ 2 - 0
scene/gui/base_button.cpp

@@ -38,6 +38,8 @@ void BaseButton::_unpress_group() {
 	if (!button_group.is_valid())
 	if (!button_group.is_valid())
 		return;
 		return;
 
 
+	status.pressed = true;
+
 	for (Set<BaseButton *>::Element *E = button_group->buttons.front(); E; E = E->next()) {
 	for (Set<BaseButton *>::Element *E = button_group->buttons.front(); E; E = E->next()) {
 		if (E->get() == this)
 		if (E->get() == this)
 			continue;
 			continue;