Commit b3cf39e2 authored by Sven Langkamp's avatar Sven Langkamp

sort presets in popup palette

BUG:339570
parent 767c87b5
......@@ -327,6 +327,12 @@ KoColor KisFavoriteResourceManager::bgColor() const
return m_bgColor;
}
bool sortPresetByName(KisPaintOpPreset* preset1, KisPaintOpPreset* preset2)
{
return preset1->name() < preset2->name();
}
void KisFavoriteResourceManager::updateFavoritePresets()
{
KisConfig cfg;
......@@ -337,6 +343,7 @@ void KisFavoriteResourceManager::updateFavoritePresets()
QStringList presetFilenames = rServer->searchTag(m_currentTag);
for(int i = 0; i < qMin(maxPresets, presetFilenames.size()); i++) {
m_favoritePresetsList.append(rServer->resourceByFilename(presetFilenames.at(i)));
qSort(m_favoritePresetsList.begin(), m_favoritePresetsList.end(), sortPresetByName);
}
emit updatePalettes();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment