commit 9cabc3f36aba1dd22e2c825ec68240d24be79ed4
Author: Juergen Spitzmueller <[email protected]>
Date: Fri Feb 21 13:19:33 2025 +0100
Fix sorting in ColorsCombo
---
src/frontends/qt/ColorsCombo.cpp | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/frontends/qt/ColorsCombo.cpp b/src/frontends/qt/ColorsCombo.cpp
index 6517f58500..6bcb6110a0 100644
--- a/src/frontends/qt/ColorsCombo.cpp
+++ b/src/frontends/qt/ColorsCombo.cpp
@@ -61,7 +61,6 @@ void ColorsCombo::addItemSort(QString const & item, QString
const & guiname,
QString const & category, QString const color)
{
QString titem = guiname;
- bool const uncategorized = category.isEmpty();
QList<QStandardItem *> row;
QStandardItem * gui = new QStandardItem(titem);
@@ -83,10 +82,7 @@ void ColorsCombo::addItemSort(QString const & item, QString
const & guiname,
// find category
int i = 0;
// Sort categories alphabetically, uncategorized at the end.
- while (i < end && model()->item(i, 2)->text() != category
- && ((!uncategorized && model()->item(i,
2)->text().localeAwareCompare(category) < 0
- && model()->item(i, 2)->text() != qt_("Uncategorized"))
- || (uncategorized && model()->item(i, 2)->text() !=
qt_("Uncategorized"))))
+ while (i < end && model()->item(i, 2)->text() != category)
++i;
// find row to insert the item, after the separator if it exists
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs