Browse Source

Emit button_up signal after setting pressed to false.

Jason Knight 4 năm trước cách đây
mục cha
commit
4c6ad8abcd
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      scene/gui/base_button.cpp

+ 1 - 2
scene/gui/base_button.cpp

@@ -175,10 +175,9 @@ void BaseButton::on_action_event(Ref<InputEvent> p_event) {
 				status.hovering = false;
 			}
 		}
-		// pressed state should be correct with button_up signal
-		emit_signal("button_up");
 		status.press_attempt = false;
 		status.pressing_inside = false;
+		emit_signal("button_up");
 	}
 
 	update();