From 1fcc1c0f18df60c9dd02cfd52eecfa51174724bd Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 5 Mar 2010 20:47:50 +0000 Subject: [PATCH] Fix bug 6522 and its relatives in trunk. I am not absolutely sure this is right, though. Someone please check. The problem, in branch, was that (in Qt 4.6.x, anyway) the call to reset() eventually triggers the on_typeCO_currentIndexChanged() method, which eventually leads to GuiView::setFocus(), which leads to GuiWorkArea::focusInEvent(), which tries to start the cursor, whose position hasn't been updated yet, from what I can see. The problem in trunk is similar. The crash happens, I think, because, while we are in the middle of resetting the model, the same method is triggered, which leads us to try to access the model while we are in the middle of resetting it. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33630 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/TocModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontends/qt4/TocModel.cpp b/src/frontends/qt4/TocModel.cpp index b8da14aa22..b6486007fd 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_->blockSignals(false); names_->reset(); + names_->blockSignals(false); }