diff --git a/apps/opencs/view/render/cameracontroller.cpp b/apps/opencs/view/render/cameracontroller.cpp index 7e3570657..288e2da07 100644 --- a/apps/opencs/view/render/cameracontroller.cpp +++ b/apps/opencs/view/render/cameracontroller.cpp @@ -632,6 +632,11 @@ namespace CSVRender getCamera()->getViewMatrix().orthoNormal(getCamera()->getViewMatrix()); } + void OrbitCameraController::reset() + { + mInitialized = false; + } + void OrbitCameraController::onActivate() { mInitialized = false; diff --git a/apps/opencs/view/render/cameracontroller.hpp b/apps/opencs/view/render/cameracontroller.hpp index 97af85790..f15cec231 100644 --- a/apps/opencs/view/render/cameracontroller.hpp +++ b/apps/opencs/view/render/cameracontroller.hpp @@ -159,6 +159,9 @@ namespace CSVRender void update(double dt); + /// \brief Flag controller to be re-initialized. + void reset(); + private: void onActivate(); diff --git a/apps/opencs/view/render/unpagedworldspacewidget.cpp b/apps/opencs/view/render/unpagedworldspacewidget.cpp index 28e269ded..b82aa45b2 100644 --- a/apps/opencs/view/render/unpagedworldspacewidget.cpp +++ b/apps/opencs/view/render/unpagedworldspacewidget.cpp @@ -15,6 +15,7 @@ #include "../widget/scenetooltoggle.hpp" #include "../widget/scenetooltoggle2.hpp" +#include "cameracontroller.hpp" #include "mask.hpp" #include "tagbase.hpp" @@ -93,6 +94,7 @@ bool CSVRender::UnpagedWorldspaceWidget::handleDrop (const std::vectorreset(); update(); emit cellChanged(*universalIdData.begin());