mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Make code a bit easier to read
This commit is contained in:
parent
b828da02f8
commit
a6b83b7444
@ -626,10 +626,11 @@ void LayoutBox::selected(int index)
|
||||
}
|
||||
|
||||
// get selection
|
||||
QModelIndex mindex = d->filterModel_->mapToSource(
|
||||
d->filterModel_->index(index, 1));
|
||||
docstring const layoutName = qstring_to_ucs4(
|
||||
d->model_->itemFromIndex(mindex)->text());
|
||||
// get the index of the untranslated layout name (which is in column 1)
|
||||
QModelIndex const lindex = d->filterModel_->index(index, 1);
|
||||
QModelIndex const mindex = d->filterModel_->mapToSource(lindex);
|
||||
QString const qlayout = d->model_->itemFromIndex(mindex)->text();
|
||||
docstring const layoutName = qstring_to_ucs4(qlayout);
|
||||
|
||||
// find corresponding text class
|
||||
if (d->text_class_->hasLayout(layoutName)) {
|
||||
|
Loading…
Reference in New Issue
Block a user