[vlmc-devel] commit: Wizzard: General page: Don' t validate data if they are marked as invalid. ( =?UTF-8?Q?Hugo=20Beauz=C3=A9e=2DLuyssen?==?UTF-8?Q?=20?=)

git at videolan.org git at videolan.org
Sat Nov 27 15:34:05 CET 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sat Nov 27 14:26:43 2010 +0100| [70cfe478a4590fec42f1283e854301e639461c12] | committer: Hugo Beauzée-Luyssen 

Wizzard: General page: Don't validate data if they are marked as invalid.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=70cfe478a4590fec42f1283e854301e639461c12
---

 src/Gui/wizard/GeneralPage.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/Gui/wizard/GeneralPage.cpp b/src/Gui/wizard/GeneralPage.cpp
index bd030cf..f27c23e 100644
--- a/src/Gui/wizard/GeneralPage.cpp
+++ b/src/Gui/wizard/GeneralPage.cpp
@@ -92,6 +92,8 @@ void GeneralPage::cleanupPage()
 bool
 GeneralPage::validatePage()
 {
+    if ( m_valid == false )
+        return false;
     SettingsManager     *sManager = SettingsManager::getInstance();
 
     const QString       &defaultProjectName = ProjectManager::unNamedProject;
@@ -142,7 +144,8 @@ GeneralPage::updateProjectLocation()
     if ( workspacePath.isEmpty() )
     {
         ui.lineEditProjectLocation->setText( tr( "Missing workspace location" ) );
-        ui.lineEditProjectLocation->setPalette( pInvalid );
+        setValidity( false );
+        return ;
     }
     else
     {
@@ -154,9 +157,9 @@ GeneralPage::updateProjectLocation()
 
         if ( workspaceDir.isRelative() )
         {
-            ui.lineEditProjectLocation->setPalette( pInvalid );
             ui.lineEditProjectLocation->setText( tr( "Invalid workspace location" ) );
-            return;
+            setValidity( false );
+            return ;
         }
 
         if ( !workspaceDir.exists() )



More information about the Vlmc-devel mailing list