From bd1d65cf1579b5530a66ff6b1cb46a43d8e836e6 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 11:34:48 +0100 Subject: [PATCH] fix(editor): no pan of the perspective view started on the sky, where the depth keeps the last hit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ --- application/editormode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/editormode.cpp b/application/editormode.cpp index f41c8d190..8863546bf 100644 --- a/application/editormode.cpp +++ b/application/editormode.cpp @@ -5740,7 +5740,7 @@ void editor_mode::on_mouse_button(int const Button, int const Action, int const { auto const &io{ImGui::GetIO()}; auto const distance{glm::length(GfxRenderer->Mouse_Position())}; - if (io.DisplaySize.y > 0.0f && distance > 0.5 && distance < 20000.0) + if (GfxRenderer->Mouse_Hit() && io.DisplaySize.y > 0.0f && distance > 0.5 && distance < 20000.0) m_pan_metres = 2.0 * distance * std::tan(glm::radians(Global.FieldOfView / Global.ZoomFactor) * 0.5) / static_cast(io.DisplaySize.y); else m_ortho_pan = false; // nothing under the cursor to hold