equal
deleted
inserted
replaced
1213 // the map has no pre-defined theme, so let's use the selected one |
1213 // the map has no pre-defined theme, so let's use the selected one |
1214 if (m_mapInfo.theme.isNull() || m_mapInfo.theme.isEmpty()) |
1214 if (m_mapInfo.theme.isNull() || m_mapInfo.theme.isEmpty()) |
1215 { |
1215 { |
1216 if (!selectedTheme.isNull() && !selectedTheme.isEmpty()) |
1216 if (!selectedTheme.isNull() && !selectedTheme.isEmpty()) |
1217 { |
1217 { |
|
1218 // Fall back to a default theme if current theme is a background theme or hidden |
|
1219 QModelIndexList mdl = m_themeModel->match(m_themeModel->index(0), ThemeModel::ActualNameRole, m_theme); |
|
1220 if (mdl.size() > 0) |
|
1221 { |
|
1222 if ((mdl.at(0).data(ThemeModel::Roles::IsBackgroundThemeRole).toBool() == true) || (mdl.at(0).data(ThemeModel::Roles::IsHiddenRole).toBool() == true)) |
|
1223 { |
|
1224 selectedTheme = "Nature"; |
|
1225 } |
|
1226 } |
1218 setTheme(selectedTheme); |
1227 setTheme(selectedTheme); |
1219 emit themeChanged(selectedTheme); |
1228 emit themeChanged(selectedTheme); |
1220 } |
1229 } |
1221 } |
1230 } |
1222 else |
1231 else |