From 9fcf3b8532fb5f756d96193288830d27bc3e4a9b Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 20 Nov 2022 16:04:39 +0100 Subject: [PATCH] PaintEditorPlugin now won't send input events to the active PaintNode, if CanvasItemEditor's currently selcted tool isn't TOOL_SELECT. --- modules/paint/paint_editor_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/paint/paint_editor_plugin.cpp b/modules/paint/paint_editor_plugin.cpp index fb0aeb5aa..af167741e 100644 --- a/modules/paint/paint_editor_plugin.cpp +++ b/modules/paint/paint_editor_plugin.cpp @@ -56,6 +56,10 @@ bool PaintEditorPlugin::forward_canvas_gui_input(const Ref &p_event) return false; } + if (CanvasItemEditor::get_singleton() && CanvasItemEditor::get_singleton()->get_current_tool() != CanvasItemEditor::TOOL_SELECT) { + return false; + } + return _active_node->forward_canvas_gui_input(p_event); } void PaintEditorPlugin::forward_canvas_draw_over_viewport(Control *p_overlay) {