mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
* fix sorting of layout names
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23428 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cabd59db2c
commit
b36c8ae173
@ -421,8 +421,10 @@ void GuiLayoutBox::set(docstring const & layout)
|
||||
void GuiLayoutBox::addItemSort(docstring const & item, bool sorted)
|
||||
{
|
||||
QString qitem = toqstr(item);
|
||||
QString titem = toqstr(translateIfPossible(item));
|
||||
|
||||
QList<QStandardItem *> row;
|
||||
row.append(new QStandardItem(toqstr(translateIfPossible(item))));
|
||||
row.append(new QStandardItem(titem));
|
||||
row.append(new QStandardItem(qitem));
|
||||
|
||||
// the simple unsorted case
|
||||
@ -435,14 +437,14 @@ void GuiLayoutBox::addItemSort(docstring const & item, bool sorted)
|
||||
// find row to insert the item
|
||||
int i = 1; // skip the Standard layout
|
||||
QString is = model_->item(i, 1)->text();
|
||||
while (is.compare(qitem) < 0) {
|
||||
while (is.compare(titem) < 0) {
|
||||
// e.g. --Separator--
|
||||
if (is[0].category() != QChar::Letter_Uppercase)
|
||||
break;
|
||||
++i;
|
||||
if (i == end)
|
||||
break;
|
||||
QString is = model_->item(i, 1)->text();
|
||||
is = model_->item(i, 1)->text();
|
||||
}
|
||||
|
||||
model_->insertRow(i, row);
|
||||
|
Loading…
Reference in New Issue
Block a user