Revert "Fix mouse button release not sent to gui_input if it's different from the button that gave focus"

This commit is contained in:
Juan Linietsky 2017-12-16 19:50:32 -03:00 committed by GitHub
parent 652c98a7be
commit 1b944cb663
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1811,8 +1811,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
_gui_call_input(gui.mouse_focus, mb);
}
if (mb->get_button_mask() == 0) {
// Last mouse button was released
if (mb->get_button_index() == gui.mouse_focus_button) {
gui.mouse_focus = NULL;
gui.mouse_focus_button = -1;
}