From 92888469084a1dd59733f5ff484c085d1b285926 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 11 Jan 2024 09:17:34 +0100 Subject: a --- editor/editor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'editor/editor.cpp') diff --git a/editor/editor.cpp b/editor/editor.cpp index 9f2761e2..de2e690e 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -17,6 +17,8 @@ void editor::clear_selection() { if (auto* ed = current_ground_editor()) ed->clear_selection(); + else if (auto* wa = current_wall_editor()) + wa->clear_selection(); else if (auto* ed = current_scenery_editor()) ed->clear_selection(); else if (auto* vo = current_vobj_editor()) @@ -100,7 +102,7 @@ Optional editor::mouse_drag_pos() void editor::on_click_(world& world, global_coords pos, button b) { - if (auto* mode = current_ground_editor(); mode != nullptr) + if (auto* mode = current_ground_editor()) { if (auto opt = mode->get_selected(); opt || b == button::remove) { @@ -112,7 +114,7 @@ void editor::on_click_(world& world, global_coords pos, button b) } } } - else if (auto* mode = current_wall_editor(); mode != nullptr) + else if (auto* mode = current_wall_editor()) { if (auto opt = mode->get_selected(); opt || b == button::remove) { -- cgit v1.2.3