mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-24 12:47:12 +01:00
Properly release LMB even while panning
This commit is contained in:
parent
48c1a1ae34
commit
f23274bbf2
@ -2755,7 +2755,10 @@ bool CanvasItemEditor::_gui_input_hover(const Ref<InputEvent> &p_event) {
|
|||||||
void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
|
void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
|
||||||
bool accepted = false;
|
bool accepted = false;
|
||||||
|
|
||||||
if (EditorSettings::get_singleton()->get("editors/2d/simple_panning") || !pan_pressed) {
|
Ref<InputEventMouseButton> mb = p_event;
|
||||||
|
bool release_lmb = (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT); // Required to properly release some stuff (e.g. selection box) while panning.
|
||||||
|
|
||||||
|
if (EditorSettings::get_singleton()->get("editors/2d/simple_panning") || !pan_pressed || release_lmb) {
|
||||||
if ((accepted = _gui_input_rulers_and_guides(p_event))) {
|
if ((accepted = _gui_input_rulers_and_guides(p_event))) {
|
||||||
//printf("Rulers and guides\n");
|
//printf("Rulers and guides\n");
|
||||||
} else if ((accepted = editor->get_editor_plugins_over()->forward_gui_input(p_event))) {
|
} else if ((accepted = editor->get_editor_plugins_over()->forward_gui_input(p_event))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user