mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
GuiRef.cpp: sort categories.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33273 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3f379915a6
commit
971d1fb7a4
@ -354,7 +354,6 @@ void GuiRef::redoRefs()
|
||||
|
||||
QStringList refsStrings;
|
||||
QStringList refsCategories;
|
||||
refsCategories.append(qt_("No prefix"));
|
||||
vector<docstring>::const_iterator iter;
|
||||
for (iter = refs_.begin(); iter != refs_.end(); ++iter) {
|
||||
QString const lab = toqstr(*iter);
|
||||
@ -365,6 +364,10 @@ void GuiRef::redoRefs()
|
||||
refsCategories.append(pref);
|
||||
}
|
||||
}
|
||||
// sort categories case-intensively
|
||||
qSort(refsCategories.begin(), refsCategories.end(),
|
||||
caseInsensitiveLessThan /*defined above*/);
|
||||
refsCategories.insert(0, qt_("<No prefix>"));
|
||||
|
||||
if (sortCB->isEnabled() && sortCB->isChecked()) {
|
||||
if(caseSensitiveCB->isEnabled() && caseSensitiveCB->isChecked())
|
||||
@ -383,7 +386,7 @@ void GuiRef::redoRefs()
|
||||
for (int i = 0; i < refsStrings.size(); ++i) {
|
||||
QString const ref = refsStrings.at(i);
|
||||
if ((ref.startsWith(cat + QString(":")))
|
||||
|| (cat == qt_("No prefix")
|
||||
|| (cat == qt_("<No prefix>")
|
||||
&& !ref.contains(":"))) {
|
||||
QTreeWidgetItem * child =
|
||||
new QTreeWidgetItem(item);
|
||||
|
Loading…
Reference in New Issue
Block a user