forked from mirror/openmw-tes3mp
Editor: flag orbit camera for re-initialization
After swapping cells the orbit cam controller needs to be re-initialized to properly center on the new cell.
This commit is contained in:
parent
f7664d4bb9
commit
84bad9316d
3 changed files with 10 additions and 0 deletions
|
@ -632,6 +632,11 @@ namespace CSVRender
|
|||
getCamera()->getViewMatrix().orthoNormal(getCamera()->getViewMatrix());
|
||||
}
|
||||
|
||||
void OrbitCameraController::reset()
|
||||
{
|
||||
mInitialized = false;
|
||||
}
|
||||
|
||||
void OrbitCameraController::onActivate()
|
||||
{
|
||||
mInitialized = false;
|
||||
|
|
|
@ -159,6 +159,9 @@ namespace CSVRender
|
|||
|
||||
void update(double dt);
|
||||
|
||||
/// \brief Flag controller to be re-initialized.
|
||||
void reset();
|
||||
|
||||
private:
|
||||
|
||||
void onActivate();
|
||||
|
|
|
@ -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::vector<CSMWorld:
|
|||
|
||||
mCell.reset (new Cell (getDocument().getData(), mRootNode, mCellId));
|
||||
mCamPositionSet = false;
|
||||
mOrbitCamControl->reset();
|
||||
|
||||
update();
|
||||
emit cellChanged(*universalIdData.begin());
|
||||
|
|
Loading…
Reference in a new issue