commit f87218bbb50e2043d3a052803cdef0bbcdcbc338
Author: Juergen Spitzmueller <[email protected]>
Date: Mon Dec 17 09:11:34 2018 +0100
Check for hidden dirty child on close
Fixes: #11405
---
src/frontends/qt4/GuiView.cpp | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index 56f4f7b..9d5f5dc 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -3069,9 +3069,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);
+ }
}
}
}