mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Really put uncategorized items at the end if sortCats is true
This commit is contained in:
parent
a7b9142e29
commit
006b50b222
@ -516,9 +516,12 @@ void CategorizedCombo::addItemSort(QString const & item, QString const & guiname
|
|||||||
// find category
|
// find category
|
||||||
int i = 0;
|
int i = 0;
|
||||||
if (sortedByCat) {
|
if (sortedByCat) {
|
||||||
|
// If sortCats == true, sort categories alphabetically, uncategorized at the end.
|
||||||
while (i < end && d->model_->item(i, 2)->text() != qcat
|
while (i < end && d->model_->item(i, 2)->text() != qcat
|
||||||
&& (!sortCats || (d->model_->item(i, 2)->text().localeAwareCompare(qcat) < 0)
|
&& (!sortCats
|
||||||
|| (uncategorized && d->model_->item(i, 2)->text() == qt_("Uncategorized"))))
|
|| (!uncategorized && d->model_->item(i, 2)->text().localeAwareCompare(qcat) < 0
|
||||||
|
&& d->model_->item(i, 2)->text() != qt_("Uncategorized"))
|
||||||
|
|| (uncategorized && d->model_->item(i, 2)->text() != qt_("Uncategorized"))))
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user