Browse Source

Prevent to uncheck selected item with button group

volzhs 8 năm trước cách đây
mục cha
commit
706ca4efd6
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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())
 		return;
 
+	status.pressed = true;
+
 	for (Set<BaseButton *>::Element *E = button_group->buttons.front(); E; E = E->next()) {
 		if (E->get() == this)
 			continue;