#4407 Make sure we convert fontInScene from point size to enum value from old registry settings

This commit is contained in:
Gaute Lindkvist
2019-05-13 13:47:03 +02:00
parent 45c5a950a4
commit b824f1d75f
5 changed files with 18 additions and 2 deletions

View File

@@ -289,6 +289,19 @@ QList<caf::PdmOptionItemInfo> RiaPreferences::calculateValueOptions(const caf::P
return options;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaPreferences::initAfterRead()
{
// If the stored font size is larger than the maximum enum value, the stored font size is actually point size
int defaultSceneFontEnumValue = static_cast<int>(defaultSceneFontSize.v());
if (defaultSceneFontEnumValue > (int) RiaFontCache::MAX_FONT_SIZE)
{
defaultSceneFontSize = RiaFontCache::fontSizeEnumFromPointSize(defaultSceneFontEnumValue);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------