]> git.lyx.org Git - features.git/commit
Fix bug discovered by Kornel. See
authorRichard Heck <rgheck@lyx.org>
Mon, 27 Jan 2014 19:58:21 +0000 (14:58 -0500)
committerRichard Heck <rgheck@lyx.org>
Wed, 29 Jan 2014 16:35:48 +0000 (11:35 -0500)
commit8c07f7fcc0beb1a68dd57300d9486865a1c5c57b
tree6524eecd620fb89e386dfdfa85b25ee6dd9c0fb1
parent75bab51a8aea749cc7fd53baa5523841e839fceb
Fix bug discovered by Kornel. See
http://marc.info/?l=lyx-devel&m=138590578911716&w=2
If you look at Buffer.cpp, around line 4351, there was a comment about bug 5699. We are seeing the
same crash. The problem is that, although the master does have a GUI, that GUI is in a different window. So the structureChanged() call we do during updateBuffer() is for the TOC in that window, not the TOC in the window we are actually in. So our TocModel::toc_ has been reset and is invalid, though the widget itself has not been updated and looks fine.

This patch tests whether the master is in the same window as the buffer we are updating.

A problem remains, which is noted in a comment.

(cherry picked from commit 3f62601a8f7fc2b5df7c6ecc54a2c331a0264290)

Conflicts:
src/Buffer.cpp
src/Buffer.cpp
status.20x