diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-08 10:06:12 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-08 10:06:12 +0200 |
| commit | d17ed6b4ba01a73d33e3ff3ca8f0f6fb25259223 (patch) | |
| tree | da7b7cfccf239d447f1d2130f901ad885b07b0c7 /editor/camera.cpp | |
| parent | 59becaeefcb564356d87aaf19cf67fccea311ca3 (diff) | |
a
Diffstat (limited to 'editor/camera.cpp')
| -rw-r--r-- | editor/camera.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/camera.cpp b/editor/camera.cpp index b43c7af8..f018ad8c 100644 --- a/editor/camera.cpp +++ b/editor/camera.cpp @@ -61,7 +61,10 @@ void app::update_cursor_tile(const Optional<Vector2i>& pixel) { cursor.pixel = pixel; if (pixel) - cursor.tile = M->pixel_to_tile(Vector2d{*pixel}); + { + auto coord = M->pixel_to_tile(Vector2d{*pixel}); + cursor.tile = {InPlaceInit, coord.chunk(), coord.local(), _z_level}; + } else cursor.tile = NullOpt; } |
