From ac4cedc596835450129df142c8876c0cb16d08c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20=27dreamsComeTrue=27=20Jasi=C5=84ski?= Date: Sun, 15 Mar 2020 10:35:53 +0100 Subject: [PATCH] Reset ruler tool when switching tools with shortcuts Fixes: #37056 (cherry picked from commit a99a671034866be275bc08ba3d4009c3fb9d8cee) --- editor/plugins/canvas_item_editor_plugin.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index c06fbe7ad3f..9ae87198f42 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2474,9 +2474,10 @@ bool CanvasItemEditor::_gui_input_select(const Ref &p_event) { } bool CanvasItemEditor::_gui_input_ruler_tool(const Ref &p_event) { - - if (tool != TOOL_RULER) + if (tool != TOOL_RULER) { + ruler_tool_active = false; return false; + } Ref b = p_event; Ref m = p_event;