diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-11 09:17:34 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-11 09:17:34 +0100 |
| commit | 92888469084a1dd59733f5ff484c085d1b285926 (patch) | |
| tree | 16373c36ef377a78e8053d8481e653068411d78e /editor/editor.cpp | |
| parent | 32b4231d09f4c19dbcbf1f29ff66d109f11be1dd (diff) | |
a
Diffstat (limited to 'editor/editor.cpp')
| -rw-r--r-- | editor/editor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<global_coords> 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) { |
