[vlmc-devel] Project: Fix cleanStateChanged emiting

Hugo Beauzée-Luyssen git at videolan.org
Sat Apr 9 22:18:21 CEST 2016


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sat Apr  9 16:41:50 2016 +0200| [f60e71176b492f108410007277fd5e43bf961625] | committer: Hugo Beauzée-Luyssen

Project: Fix cleanStateChanged emiting

> https://code.videolan.org/videolan/vlmc/commit/f60e71176b492f108410007277fd5e43bf961625
---

 src/Project/Project.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/Project/Project.cpp b/src/Project/Project.cpp
index 85ceed4..38ea36a 100644
--- a/src/Project/Project.cpp
+++ b/src/Project/Project.cpp
@@ -334,8 +334,7 @@ Project::cleanChanged( bool val )
     // This doesn't have to be different since we can force needSave = true when loading
     // a backup project file. This definitely needs testing though
     m_isClean = val;
-    if ( m_libraryCleanState == m_isClean )
-        emit cleanStateChanged( val );
+    emit cleanStateChanged( m_libraryCleanState == true && m_isClean == true );
 }
 
 void
@@ -343,8 +342,7 @@ Project::libraryCleanChanged(bool val)
 {
     Q_ASSERT( m_libraryCleanState != val);
     m_libraryCleanState = val;
-    if ( m_libraryCleanState == m_isClean )
-        emit cleanStateChanged( val );
+    emit cleanStateChanged( m_libraryCleanState == true && m_isClean == true );
 }
 
 void



More information about the Vlmc-devel mailing list