From 9fd0acae47fc5130ccb1960d84fd42e05ec9708a Mon Sep 17 00:00:00 2001 From: Ivan Mogilko Date: Thu, 24 Aug 2023 15:00:26 +0300 Subject: [PATCH] Editor: fixed Line tool triggering sometimes after a context menu --- .../Panes/Room/RoomEditFilters/BaseAreasEditorFilter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Editor/AGS.Editor/Panes/Room/RoomEditFilters/BaseAreasEditorFilter.cs b/Editor/AGS.Editor/Panes/Room/RoomEditFilters/BaseAreasEditorFilter.cs index b65b1cd78eb..ce800536e7e 100644 --- a/Editor/AGS.Editor/Panes/Room/RoomEditFilters/BaseAreasEditorFilter.cs +++ b/Editor/AGS.Editor/Panes/Room/RoomEditFilters/BaseAreasEditorFilter.cs @@ -300,9 +300,10 @@ private bool IsLocked(int area) public virtual bool MouseUp(MouseEventArgs e, RoomEditorState state) { - _mouseDown = false; if (e.Button == MouseButtons.Middle) return false; + if (!_mouseDown) return false; // drawing was not triggered + _mouseDown = false; AreaDrawMode drawMode = Enabled ? _drawMode : AreaDrawMode.Select; if (IsLocked(_selectedArea) && drawMode != AreaDrawMode.Select) return false;