Skip to content

Commit

Permalink
Editor: fixed Line tool triggering sometimes after a context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mogilko committed Aug 24, 2023
1 parent e39808c commit 9fd0aca
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9fd0aca

Please sign in to comment.