mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Fix bug #11405.
We don't actually prevent hidden buffers from being dirty, so we need
to save them if they are.
(cherry picked from commit b2517d60b8
)
This commit is contained in:
parent
a355cd82c2
commit
774bbbe1b6
@ -2923,6 +2923,14 @@ void GuiView::writeSession() const {
|
||||
|
||||
bool GuiView::closeBufferAll()
|
||||
{
|
||||
|
||||
for (auto & buf : theBufferList()) {
|
||||
if (!saveBufferIfNeeded(*buf, false)) {
|
||||
// Closing has been cancelled, so abort.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Close the workareas in all other views
|
||||
QList<int> const ids = guiApp->viewIds();
|
||||
for (int i = 0; i != ids.size(); ++i) {
|
||||
@ -2934,9 +2942,6 @@ bool GuiView::closeBufferAll()
|
||||
if (!closeWorkAreaAll())
|
||||
return false;
|
||||
|
||||
// Now close the hidden buffers. We prevent hidden buffers from being
|
||||
// dirty, so we can just close them.
|
||||
theBufferList().closeAll();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,8 @@ What's new
|
||||
- Fix crash when rejecting changes and the cursor is in an inset that will be
|
||||
deleted (bug 10316).
|
||||
|
||||
- Ask to save hidden dirty documents (bug 11405).
|
||||
|
||||
|
||||
* INTERNALS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user