mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
* GuiToolbar.cpp (set):
- honour obsoleted styles (part of bug 2607). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27772 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
287de0508d
commit
6edb56cf03
@ -508,10 +508,15 @@ void GuiLayoutBox::set(docstring const & layout)
|
||||
return;
|
||||
|
||||
Layout const & lay = (*text_class_)[layout];
|
||||
QString const newLayout = toqstr(lay.name());
|
||||
QString newLayout = toqstr(lay.name());
|
||||
|
||||
// If the layout is obsolete, use the new one instead.
|
||||
docstring const & obs = lay.obsoleted_by();
|
||||
if (!obs.empty())
|
||||
newLayout = toqstr(obs);
|
||||
|
||||
int const curItem = currentIndex();
|
||||
QModelIndex const mindex =
|
||||
QModelIndex const mindex =
|
||||
filterModel_->mapToSource(filterModel_->index(curItem, 1));
|
||||
QString const & currentLayout = model_->itemFromIndex(mindex)->text();
|
||||
if (newLayout == currentLayout) {
|
||||
|
Loading…
Reference in New Issue
Block a user