]> git.lyx.org Git - features.git/commitdiff
Fix bug 6522 and its relatives in trunk. I am not absolutely sure this
authorRichard Heck <rgheck@comcast.net>
Fri, 5 Mar 2010 20:47:50 +0000 (20:47 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 5 Mar 2010 20:47:50 +0000 (20:47 +0000)
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

index b8da14aa22d710348119565583c719257c8eb8dd..b6486007fdca4eeb8fd8f13a733d8054fca6cd58 100644 (file)
@@ -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);
 }