mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-01 21:45:23 +00:00
Revert r33630 and do something more sensible.
I don't think this fixes the underlying problem, but I think that problem is very extensive. Fixing it would involve a re-thinking of where and how we call updateBuffer()---the old updateLabels(). This fix also reveals another problem with the TOC, again due to the early call of on_typeCO_currentIndexChanged(). But that problem is a slightly different one, I think. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33680 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8a6b77bfe1
commit
c653974e9d
@ -359,8 +359,8 @@ void TocModels::reset(BufferView const * bv)
|
|||||||
names_->setData(index, gui_name, Qt::DisplayRole);
|
names_->setData(index, gui_name, Qt::DisplayRole);
|
||||||
names_->setData(index, type, Qt::UserRole);
|
names_->setData(index, type, Qt::UserRole);
|
||||||
}
|
}
|
||||||
names_->reset();
|
|
||||||
names_->blockSignals(false);
|
names_->blockSignals(false);
|
||||||
|
names_->reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -315,6 +315,12 @@ void TocWidget::on_typeCO_currentIndexChanged(int index)
|
|||||||
{
|
{
|
||||||
current_type_ = typeCO->itemData(index).toString();
|
current_type_ = typeCO->itemData(index).toString();
|
||||||
updateView();
|
updateView();
|
||||||
|
// In Qt 4.6.x, we can end up here programmatically, when the
|
||||||
|
// model is rebuilt. But the Buffer may not be ready for us to
|
||||||
|
// reset focus, start the cursor, etc. So we check to see if the
|
||||||
|
// combo box has focus. It will, if the user has changed the
|
||||||
|
// value.
|
||||||
|
if (typeCO->hasFocus())
|
||||||
gui_view_.setFocus();
|
gui_view_.setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user