From 22db01d7a989c3c24fd46d228accd1ca09e1d25b Mon Sep 17 00:00:00 2001 From: Uwe Date: Tue, 28 Feb 2023 10:15:25 +0100 Subject: [PATCH] [Gui] NaviCube: don't write font size on loading preferences - as discussed here: https://github.com/FreeCAD/FreeCAD/pull/8567#issuecomment-1445283127 and following) --- src/Gui/DlgSettingsNavigation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Gui/DlgSettingsNavigation.cpp b/src/Gui/DlgSettingsNavigation.cpp index 3785b57edb..ab4f9e83af 100644 --- a/src/Gui/DlgSettingsNavigation.cpp +++ b/src/Gui/DlgSettingsNavigation.cpp @@ -211,8 +211,9 @@ void DlgSettingsNavigation::loadSettings() // but not accessible if there is no cube yet drawn if (hGrp->GetInt("FontSize", 0) == 0) { // the "4" is the hardcoded m_OverSample from getDefaultFontSize() - hGrp->SetInt("FontSize", int(0.18 * 4 * ui->prefCubeSize->value())); - ui->naviCubeFontSize->onRestore(); + ui->naviCubeFontSize->setValue(int(0.18 * 4 * ui->prefCubeSize->value())); + // we purposely don't write to the parameters because the writing would + // also be done when the user cancels the preferences dialog } }