forked from qt-creator/qt-creator
Editor: Fix loading color schemes
When the user switched to another builtin color scheme the full paths check do not match anymore if the user starts a Qt Creator with a different install dir. Change-Id: I4692c85a23a7d524497786db4dd8e1a00bb7a9fe Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -700,7 +700,7 @@ void FontSettingsPageWidget::refreshColorSchemeList()
|
||||
int selected = 0;
|
||||
|
||||
for (const FilePath &file : std::as_const(schemeList)) {
|
||||
if (m_value.colorSchemeFileName() == file)
|
||||
if (m_value.colorSchemeFileName().fileName() == file.fileName())
|
||||
selected = colorSchemes.size();
|
||||
colorSchemes.append(ColorSchemeEntry(file, true));
|
||||
}
|
||||
@@ -710,7 +710,7 @@ void FontSettingsPageWidget::refreshColorSchemeList()
|
||||
|
||||
const FilePaths files = customStylesPath().dirEntries(FileFilter({"*.xml"}, QDir::Files));
|
||||
for (const FilePath &file : files) {
|
||||
if (m_value.colorSchemeFileName() == file)
|
||||
if (m_value.colorSchemeFileName().fileName() == file.fileName())
|
||||
selected = colorSchemes.size();
|
||||
colorSchemes.append(ColorSchemeEntry(file, false));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user