From 21e3324e9202c48b8f97e97ee78b9f308fe7e1b7 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 20 Nov 2022 17:16:53 +0100 Subject: editor: fix cursor tile drawing --- editor/update.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/update.cpp b/editor/update.cpp index a1f5d807..e9207cf6 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -40,8 +40,8 @@ void app::maybe_initialize_chunk([[maybe_unused]] const chunk_coords& pos, [[may void app::do_mouse_move(int mods) { - if (auto [tile, b] = cursor.tile; b && !cursor.in_imgui) - _editor.on_mouse_move(M->world(), tile, mods); + if (cursor.tile && !cursor.in_imgui) + _editor.on_mouse_move(M->world(), *cursor.tile, mods); } void app::do_mouse_up_down(std::uint8_t button, bool is_down, int mods) -- cgit v1.2.3