You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Update to only use select tool on button press
It used to run the code twice, probably once on button press, once on button release.
This commit is contained in:
@@ -2216,7 +2216,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
|
|||||||
Ref<InputEventKey> k = p_event;
|
Ref<InputEventKey> k = p_event;
|
||||||
|
|
||||||
if (drag_type == DRAG_NONE) {
|
if (drag_type == DRAG_NONE) {
|
||||||
if (b.is_valid() &&
|
if (b.is_valid() && b->is_pressed() &&
|
||||||
((b->get_button_index() == MouseButton::RIGHT && b->is_alt_pressed() && tool == TOOL_SELECT) ||
|
((b->get_button_index() == MouseButton::RIGHT && b->is_alt_pressed() && tool == TOOL_SELECT) ||
|
||||||
(b->get_button_index() == MouseButton::LEFT && tool == TOOL_LIST_SELECT))) {
|
(b->get_button_index() == MouseButton::LEFT && tool == TOOL_LIST_SELECT))) {
|
||||||
// Popup the selection menu list
|
// Popup the selection menu list
|
||||||
|
|||||||
Reference in New Issue
Block a user