[LyX/master] Slight rearrangement
Richard Kimberly Heck
rikiheck at lyx.org
Wed Aug 16 21:25:25 UTC 2023
commit b828da02f810a6d99e62b2276a17983acc7228cb
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date: Wed Aug 16 18:38:19 2023 -0400
Slight rearrangement
---
src/frontends/qt/LayoutBox.cpp | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/frontends/qt/LayoutBox.cpp b/src/frontends/qt/LayoutBox.cpp
index ed80332..a4ad9ba 100644
--- a/src/frontends/qt/LayoutBox.cpp
+++ b/src/frontends/qt/LayoutBox.cpp
@@ -618,19 +618,19 @@ void LayoutBox::updateContents(bool reset)
void LayoutBox::selected(int index)
{
- // get selection
- QModelIndex mindex = d->filterModel_->mapToSource(
- d->filterModel_->index(index, 1));
- docstring layoutName = qstring_to_ucs4(
- d->model_->itemFromIndex(mindex)->text());
d->owner_.setFocus();
-
if (!d->text_class_) {
updateContents(false);
d->resetFilter();
return;
}
+ // get selection
+ QModelIndex mindex = d->filterModel_->mapToSource(
+ d->filterModel_->index(index, 1));
+ docstring const layoutName = qstring_to_ucs4(
+ d->model_->itemFromIndex(mindex)->text());
+
// find corresponding text class
if (d->text_class_->hasLayout(layoutName)) {
FuncRequest const func(LFUN_LAYOUT, layoutName, FuncRequest::TOOLBAR);
@@ -639,7 +639,7 @@ void LayoutBox::selected(int index)
d->resetFilter();
return;
}
- LYXERR0("ERROR (layoutSelected): layout " << layoutName << " not found!");
+ LYXERR0("ERROR (LayoutBox::Selected): layout " << layoutName << " not found!");
}
More information about the lyx-cvs
mailing list