[vlmc-devel] [PATCH] Fix project closes without showing MsgBox when <empty> is clicked. Change project::isClean() to project::undostack::count()

Hieu Pham phamhuuquanghieu at gmail.com
Sat Mar 11 04:39:07 CET 2017


---
 src/Gui/MainWindow.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 37e3507..0d1e6dd 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -826,7 +826,7 @@ MainWindow::saveSettings()
 void
 MainWindow::closeEvent( QCloseEvent* e )
 {
-    if ( Core::instance()->project()->isClean() == false )
+    if ( Core::instance()->workflow()->undoStack()->count() > 0 )
     {
         QMessageBox msgBox;
         msgBox.setText( QObject::tr( "The project has been modified." ) );
-- 
2.9.3



More information about the Vlmc-devel mailing list