mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
Fix this bug reported by Mael Hilléreau:
1. Open a document with child documents, each comprising divisions; 2. Show the outline pane. You can see childs' divisions; 3. Select (view) one of the childs; 4. Close this child doc. The focus comes back to the master doc; 5. Click in the outline pane at some point corresponding to the child doc you closed. LyX crashes with SIGSEGV (instead of reopening the child...). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18939 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
208a64d292
commit
39d3f11612
@ -155,6 +155,12 @@ void LyXView::setBuffer(Buffer * b, bool child_document)
|
|||||||
updateLabels(*newBuffer->getMasterBuffer());
|
updateLabels(*newBuffer->getMasterBuffer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!b && oldBuffer && oldBuffer->getMasterBuffer() != oldBuffer)
|
||||||
|
// We are closing oldBuffer which was a child document so we
|
||||||
|
// must update the labels and section numbering of its master
|
||||||
|
// Buffer.
|
||||||
|
updateLabels(*oldBuffer->getMasterBuffer());
|
||||||
|
|
||||||
connectBuffer(*newBuffer);
|
connectBuffer(*newBuffer);
|
||||||
|
|
||||||
// Buffer-dependent dialogs should be updated or
|
// Buffer-dependent dialogs should be updated or
|
||||||
|
Loading…
Reference in New Issue
Block a user