On 05/03/2010 21:47, rgh...@lyx.org wrote:
Author: rgheck
Date: Fri Mar  5 21:47:50 2010
New Revision: 33630
URL: http://www.lyx.org/trac/changeset/33630

Log:
Fix bug 6522 and its relatives in trunk. I am not absolutely sure this
is right, though. Someone please check.

Seems correct.

Abdel.


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.

Modified:
    lyx-devel/trunk/src/frontends/qt4/TocModel.cpp

Modified: lyx-devel/trunk/src/frontends/qt4/TocModel.cpp
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/TocModel.cpp      Fri Mar  5 21:40:45 
2010        (r33629)
+++ lyx-devel/trunk/src/frontends/qt4/TocModel.cpp      Fri Mar  5 21:47:50 
2010        (r33630)
@@ -359,8 +359,8 @@
                names_->setData(index, gui_name, Qt::DisplayRole);
                names_->setData(index, type, Qt::UserRole);
        }
-       names_->blockSignals(false);
        names_->reset();
+       names_->blockSignals(false);
  }





Reply via email to