From d14ff2a54ee7e5343b0c0ea38e8d416d147e43f4 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sun, 28 Aug 2016 11:26:23 +0200 Subject: [PATCH] Fix removing things in the editor when stopping standard-scrolling with RMB The cause for this was that the `HandleMouseInput` method of the `EditorViewPortController` ran before the one from the regular `ViewPortController`, thus intercepting the button press. Switching the order of the two around fixes that, but introduced another problem, namely that the tooltips stopped working. Switching the order meant that the `ViewPortController` laid "on top" of the `EditorViewPortController`, so the latter didn't receive the `MouseEntered` event anymore. Setting the `IgnoreMouseOver` flag in the `ViewPortController` fixes this. --- mods/cnc/chrome/editor.yaml | 7 ++++--- mods/ra/chrome/editor.yaml | 10 ++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/mods/cnc/chrome/editor.yaml b/mods/cnc/chrome/editor.yaml index 943bddbbab..e67fcd31a6 100644 --- a/mods/cnc/chrome/editor.yaml +++ b/mods/cnc/chrome/editor.yaml @@ -203,9 +203,6 @@ Container@EDITOR_WORLD_ROOT: Logic: LoadIngamePerfLogic, MapEditorLogic Children: Container@PERF_ROOT: - ViewportController: - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM EditorViewportController@MAP_EDITOR: Width: WINDOW_RIGHT Height: WINDOW_BOTTOM @@ -218,6 +215,10 @@ Container@EDITOR_WORLD_ROOT: Visible: false ActorPreview@DRAG_ACTOR_PREVIEW: Visible: false + ViewportController: + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + IgnoreMouseOver: True Background@RADAR_BG: X: WINDOW_RIGHT-255 Y: 5 diff --git a/mods/ra/chrome/editor.yaml b/mods/ra/chrome/editor.yaml index fecc8bcfa8..a1d37314a0 100644 --- a/mods/ra/chrome/editor.yaml +++ b/mods/ra/chrome/editor.yaml @@ -194,12 +194,6 @@ Container@EDITOR_WORLD_ROOT: Logic: LoadIngamePerfLogic, MapEditorLogic Children: Container@PERF_ROOT: - ViewportController: - X: 0 - Y: 0 - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - TooltipContainer: TOOLTIP_CONTAINER EditorViewportController@MAP_EDITOR: Width: WINDOW_RIGHT Height: WINDOW_BOTTOM @@ -212,6 +206,10 @@ Container@EDITOR_WORLD_ROOT: Visible: false Sprite@DRAG_LAYER_PREVIEW: Visible: false + ViewportController: + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + IgnoreMouseOver: True Background@RADAR_BG: X: WINDOW_RIGHT-255 Y: 5