From: Juergen Spitzmueller Date: Mon, 17 Dec 2018 08:11:34 +0000 (+0100) Subject: Check for hidden dirty child on close X-Git-Tag: 2.3.3~115 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=aea162cc8d8b0ed702afe6de72b44aa4f3ed4af4;p=features.git Check for hidden dirty child on close Fixes: #11405 (cherry picked from commit f87218bbb50e2043d3a052803cdef0bbcdcbc338) --- diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 1dda3638ff..9581c73148 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -3019,9 +3019,13 @@ bool GuiView::closeBuffer(Buffer & buf) break; } else { // In this case the child buffer is open but hidden. - // It therefore should not (MUST NOT) be dirty! - LATTEST(child_buf->isClean()); - theBufferList().release(child_buf); + // Even in this case, children can be dirty (e.g., + // after a label change in the master, see #11405). + // Therefore, check this. + if (saveBufferIfNeeded(*child_buf, false)) { + child_buf->removeAutosaveFile(); + theBufferList().release(child_buf); + } } } } diff --git a/status.23x b/status.23x index fe431d3ba5..a83d30b446 100644 --- a/status.23x +++ b/status.23x @@ -56,6 +56,8 @@ What's new - Fix reloading of local layout file (bug 11120). +- Check for dirty hidden child documents when closing (bug 11405). + - Fix selection of unmarked RtL characters with Qt 5.11 (bug 11284). - Fix on-screen display of macros whose name is a single non-letter symbol