diff --git a/Editor/src/Windows/EditorInterface.cpp b/Editor/src/Windows/EditorInterface.cpp index 1175d027..c4e184ad 100644 --- a/Editor/src/Windows/EditorInterface.cpp +++ b/Editor/src/Windows/EditorInterface.cpp @@ -252,7 +252,7 @@ namespace Nuake { m_IsViewportFocused = ImGui::IsWindowFocused(); - if (m_IsHoveringViewport && Input::IsMouseButtonPressed(GLFW_MOUSE_BUTTON_1) && !ImGuizmo::IsUsing()) + if (m_IsHoveringViewport && Input::IsMouseButtonPressed(GLFW_MOUSE_BUTTON_1) && !ImGuizmo::IsUsing() && m_IsViewportFocused) { const auto windowPosNuake = Vector2(windowPos.x, windowPos.y); auto& gbuffer = Engine::GetCurrentScene()->m_SceneRenderer->GetGBuffer();