]> git.lyx.org Git - features.git/commitdiff
Mark a buffer as clean when the user chose to discard the changes. This is a patch...
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 16 Aug 2009 00:26:14 +0000 (00:26 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 16 Aug 2009 00:26:14 +0000 (00:26 +0000)
Besides that, this can also been seen in 1.6.3. If you have a master and a dirty child, and the dirty child is the second tab, you'll see that when closing LyX, LyX will ask twice whether you want to save the file. Once if the file itself is closed, a second time if the master is closing all his children.

See also the previous commit that treats the case in which the tabs were switched around.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31074 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index df9986b29e7fab6bc735549aab8417e6a54110bb..afe7af9f1579f7b3c786b617713957ce2704beb8 100644 (file)
@@ -2005,11 +2005,10 @@ bool GuiView::saveBufferIfNeeded(Buffer & buf, bool hiding)
                // have no autosave file but I guess
                // this is really improbable (Jug)
                buf.removeAutosaveFile();
-               if (hiding) {
+               if (hiding)
                        // revert all changes
                        buf.loadLyXFile(buf.fileName());
-                       buf.markClean();
-               }
+               buf.markClean();
                break;
        case 2:
                return false;