diff --git a/apps/opencs/view/render/cameracontroller.cpp b/apps/opencs/view/render/cameracontroller.cpp index 7e3570657..7b802b0ef 100644 --- a/apps/opencs/view/render/cameracontroller.cpp +++ b/apps/opencs/view/render/cameracontroller.cpp @@ -632,7 +632,7 @@ namespace CSVRender getCamera()->getViewMatrix().orthoNormal(getCamera()->getViewMatrix()); } - void OrbitCameraController::onActivate() + void OrbitCameraController::reset() { mInitialized = false; } diff --git a/apps/opencs/view/render/cameracontroller.hpp b/apps/opencs/view/render/cameracontroller.hpp index 97af85790..a2ebba51a 100644 --- a/apps/opencs/view/render/cameracontroller.hpp +++ b/apps/opencs/view/render/cameracontroller.hpp @@ -63,8 +63,6 @@ namespace CSVRender protected: - virtual void onActivate(){} - void addShortcut(CSMPrefs::Shortcut* shortcut); private: @@ -159,9 +157,10 @@ namespace CSVRender void update(double dt); - private: + /// \brief Flag controller to be re-initialized. + void reset(); - void onActivate(); + private: void initialize(); diff --git a/apps/opencs/view/render/unpagedworldspacewidget.cpp b/apps/opencs/view/render/unpagedworldspacewidget.cpp index de999db0f..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" @@ -92,6 +93,8 @@ bool CSVRender::UnpagedWorldspaceWidget::handleDrop (const std::vectorgetId(); mCell.reset (new Cell (getDocument().getData(), mRootNode, mCellId)); + mCamPositionSet = false; + mOrbitCamControl->reset(); update(); emit cellChanged(*universalIdData.begin());