From f1f2a8bd26f34c75fa8be51e2bfa92bd67a67cbb Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Sat, 1 May 2021 16:24:55 -0700 Subject: [PATCH] Reset view when creating a new submodel. Fixes #703. --- common/project.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/project.cpp b/common/project.cpp index f0f77296..8a4cdcaf 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -257,6 +257,11 @@ lcModel* Project::CreateNewModel(bool ShowModel) if (ShowModel) { SetActiveModel(mModels.GetSize() - 1); + + lcView* ActiveView = gMainWindow ? gMainWindow->GetActiveView() : nullptr; + if (ActiveView) + ActiveView->GetCamera()->SetViewpoint(lcViewpoint::Home); + gMainWindow->UpdateTitle(); } else