From eb6df6fe623d1d74e053d3a065e090807d919eae Mon Sep 17 00:00:00 2001 From: teees Date: Tue, 3 Nov 2015 11:45:10 +0100 Subject: [PATCH] Handle mouse up event in default editor brush --- OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs b/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs index dc86985f34..b1ef3de1b2 100644 --- a/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs +++ b/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs @@ -55,12 +55,11 @@ namespace OpenRA.Mods.Common.Widgets { // Exclusively uses mouse wheel and right mouse buttons, but nothing else // Mouse move events are important for tooltips, so we always allow these through - if (mi.Button != MouseButton.Right && mi.Event != MouseInputEvent.Move && mi.Event != MouseInputEvent.Scroll) + if ((mi.Button != MouseButton.Right && mi.Event != MouseInputEvent.Move && mi.Event != MouseInputEvent.Scroll) || + mi.Event == MouseInputEvent.Down) return false; var cell = worldRenderer.Viewport.ViewToWorld(mi.Location); - if (mi.Event == MouseInputEvent.Up) - return true; var underCursor = editorLayer.PreviewsAt(worldRenderer.Viewport.ViewToWorldPx(mi.Location)) .FirstOrDefault();