diff options
author | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2023-04-13 14:20:35 +0300 |
---|---|---|
committer | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2023-04-18 07:34:36 +0300 |
commit | 86665d774ec0e4efb46eec47fdc8297a3ff5d196 (patch) | |
tree | 7f974b66569c5a443657ddebf0971034c796668f /src/datavisualization/theme/q3dtheme.cpp | |
parent | 63b27b664ea8a41420723e053830412068c6eefe (diff) |
Fix invalid value handling
Pick-to: 6.5
Fixes: QTBUG-112773
Change-Id: I3b00587d27e88dd69b58efe3551abf8759df0020
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/datavisualization/theme/q3dtheme.cpp')
-rw-r--r-- | src/datavisualization/theme/q3dtheme.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/datavisualization/theme/q3dtheme.cpp b/src/datavisualization/theme/q3dtheme.cpp index 8832ad0d..39fe9dbc 100644 --- a/src/datavisualization/theme/q3dtheme.cpp +++ b/src/datavisualization/theme/q3dtheme.cpp @@ -996,11 +996,13 @@ Q3DTheme::ColorStyle Q3DTheme::colorStyle() const */ void Q3DTheme::setType(Theme themeType) { - d_ptr->m_dirtyBits.themeIdDirty = true; - if (d_ptr->m_themeId != themeType) { - d_ptr->m_themeId = themeType; - ThemeManager::setPredefinedPropertiesToTheme(this, themeType); - emit typeChanged(themeType); + if (themeType >= ThemeQt && themeType <= ThemeUserDefined) { + d_ptr->m_dirtyBits.themeIdDirty = true; + if (d_ptr->m_themeId != themeType) { + d_ptr->m_themeId = themeType; + ThemeManager::setPredefinedPropertiesToTheme(this, themeType); + emit typeChanged(themeType); + } } } |