From 5435b3e4db1a8df4f77cc80d019a93169d6b5114 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 20 Oct 2024 20:13:01 +0200 Subject: [PATCH] Core: Set unit scheme when switching between unsaved documents Fixes #17297 --- src/Gui/Application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 729f34f1d4..c7b76a494c 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -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(userSchema)); getMainWindow()->setUserSchema(userSchema);