forked from qt-creator/qt-creator
QmlDesigner: Reset camera speeds when project changes
Fixes: QDS-12297 Change-Id: Ia86f2290cdc94e637b7c12f48b379c429338ff0e Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -279,6 +279,14 @@ void Edit3DView::modelAttached(Model *model)
|
||||
{
|
||||
AbstractView::modelAttached(model);
|
||||
|
||||
QString currProjectPath = QmlDesigner::DocumentManager::currentProjectDirPath().toString();
|
||||
if (m_currProjectPath != currProjectPath) {
|
||||
// Opening a new project -> reset camera speeds
|
||||
m_currProjectPath = currProjectPath;
|
||||
m_previousCameraSpeed = -1.;
|
||||
m_previousCameraMultiplier = -1.;
|
||||
}
|
||||
|
||||
syncSnapAuxPropsToSettings();
|
||||
|
||||
rootModelNode().setAuxiliaryData(edit3dGridColorProperty,
|
||||
|
@@ -192,6 +192,7 @@ private:
|
||||
|
||||
double m_previousCameraSpeed = -1.;
|
||||
double m_previousCameraMultiplier = -1.;
|
||||
QString m_currProjectPath;
|
||||
|
||||
friend class Edit3DAction;
|
||||
};
|
||||
|
Reference in New Issue
Block a user