diff --git a/src/frontends/qt4/TocModel.cpp b/src/frontends/qt4/TocModel.cpp index b6486007fd..b8da14aa22 100644 --- a/src/frontends/qt4/TocModel.cpp +++ b/src/frontends/qt4/TocModel.cpp @@ -359,8 +359,8 @@ void TocModels::reset(BufferView const * bv) names_->setData(index, gui_name, Qt::DisplayRole); names_->setData(index, type, Qt::UserRole); } - names_->reset(); names_->blockSignals(false); + names_->reset(); } diff --git a/src/frontends/qt4/TocWidget.cpp b/src/frontends/qt4/TocWidget.cpp index 738e474b15..6ea1bb9311 100644 --- a/src/frontends/qt4/TocWidget.cpp +++ b/src/frontends/qt4/TocWidget.cpp @@ -315,7 +315,13 @@ void TocWidget::on_typeCO_currentIndexChanged(int index) { current_type_ = typeCO->itemData(index).toString(); updateView(); - gui_view_.setFocus(); + // 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(); }