Core: Set unit scheme when switching between unsaved documents
Fixes #17297
This commit is contained in:
@@ -1027,7 +1027,7 @@ void Application::slotActiveDocument(const App::Document& Doc)
|
||||
// Update the application to show the unit change
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/Units");
|
||||
if (Doc.FileName.getValue()[0] != '\0' && !hGrp->GetBool("IgnoreProjectSchema")) {
|
||||
if (!hGrp->GetBool("IgnoreProjectSchema")) {
|
||||
int userSchema = Doc.UnitSystem.getValue();
|
||||
Base::UnitsApi::setSchema(static_cast<Base::UnitSystem>(userSchema));
|
||||
getMainWindow()->setUserSchema(userSchema);
|
||||
|
||||
Reference in New Issue
Block a user