From cf725c8f03a6cdc1dd519b9733add6694aadc67a Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 24 Feb 2020 16:04:18 +0100 Subject: [PATCH] Preferences : Stop writing out obsolete fields Writing of obsoleted font size fields caused issues when trying set font size 8. The reason for this was export of obsolete fields, and creation of default value for obsolete fields when applying new preference values. --- ApplicationCode/Application/RiaPreferences.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ApplicationCode/Application/RiaPreferences.cpp b/ApplicationCode/Application/RiaPreferences.cpp index 07ac962f5d..0a0c9c282b 100644 --- a/ApplicationCode/Application/RiaPreferences.cpp +++ b/ApplicationCode/Application/RiaPreferences.cpp @@ -376,6 +376,8 @@ RiaPreferences::RiaPreferences( void ) caf::AppEnum invalidFontSize = RiaFontCache::INVALID; CAF_PDM_InitField( &m_defaultSceneFontSize_OBSOLETE, "fontSizeInScene", invalidFontSize, "Viewer Font Size", "", "", "" ); + m_defaultSceneFontSize_OBSOLETE.xmlCapability()->setIOWritable( false ); + CAF_PDM_InitField( &m_defaultAnnotationFontSize_OBSOLETE, "defaultAnnotationFontSize", invalidFontSize, @@ -383,6 +385,8 @@ RiaPreferences::RiaPreferences( void ) "", "", "" ); + m_defaultAnnotationFontSize_OBSOLETE.xmlCapability()->setIOWritable( false ); + CAF_PDM_InitField( &m_defaultWellLabelFontSize_OBSOLETE, "wellLabelFontSize", invalidFontSize, @@ -390,7 +394,10 @@ RiaPreferences::RiaPreferences( void ) "", "", "" ); + m_defaultWellLabelFontSize_OBSOLETE.xmlCapability()->setIOWritable( false ); + CAF_PDM_InitField( &m_defaultPlotFontSize_OBSOLETE, "defaultPlotFontSize", invalidFontSize, "Plot Font Size", "", "", "" ); + m_defaultPlotFontSize_OBSOLETE.xmlCapability()->setIOWritable( false ); CAF_PDM_InitField( &m_openExportedPdfInViewer, "openExportedPdfInViewer", false, "Open Exported PDF in Viewer", "", "", "" ); m_openExportedPdfInViewer.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );