summaryrefslogtreecommitdiffhomepage
path: root/editor/camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/camera.cpp')
-rw-r--r--editor/camera.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/camera.cpp b/editor/camera.cpp
index 35d24ef4..e22b20ba 100644
--- a/editor/camera.cpp
+++ b/editor/camera.cpp
@@ -59,8 +59,8 @@ void app::reset_camera_offset()
void app::update_cursor_tile(const Optional<Vector2i>& pixel)
{
cursor.pixel = pixel;
- if (pixel)
- cursor.tile = M->pixel_to_tile(Vector2d{*pixel});
+ if (const auto [p, b] = pixel; b)
+ cursor.tile = M->pixel_to_tile(Vector2d{p});
else
cursor.tile = NullOpt;
}