]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Fix a bug with GUI frozing when switching from the second "Products" page to the... SALOME_2_1_0 SALOME_V_2_2_0
authorvsr <vsr@opencascade.com>
Thu, 17 Feb 2005 12:00:07 +0000 (12:00 +0000)
committervsr <vsr@opencascade.com>
Thu, 17 Feb 2005 12:00:07 +0000 (12:00 +0000)
bin/SALOME_InstallWizard
src/InstallWizard.cpp
src/SALOME_InstallWizard.cxx

index dc87b9cf9d8706d54978f1522f4381d4179decce..626e8b612a91a3463002820339d0c0af1af19bcb 100755 (executable)
Binary files a/bin/SALOME_InstallWizard and b/bin/SALOME_InstallWizard differ
index 28d529acbcfa7e7b0bd00c71df156a00de01f440..b65c80e8b66d33b5cb9eb9583bd610faecf1e598 100644 (file)
@@ -48,6 +48,7 @@
 #include <qaccel.h>
 #include <qhbox.h>
 #include <qobjectlist.h>
+#include <qthread.h>
 
 #define PROCESS_EVENT QEvent::User+100
 
@@ -914,7 +915,7 @@ Posts validation event
 */
 void InstallWizard::postValidateEvent( InstallWizard* iw, const int val, void* data )
 {
-  QApplication::postEvent( iw, new ProcessEvent( val, data ) );
+  QThread::postEvent( iw, new ProcessEvent( val, data ) );
 }
 
 /*!
index 251e375a16845e96f10c4b2b31c5cfe012130cb7..9a83803f0d64b2763397267427b56b4b14491755 100644 (file)
@@ -132,6 +132,8 @@ public:
                     parent->y() + (parent->height()-sh.height())/2 );
        myDlg->show();
       }
+      myDlg->raise();
+      myDlg->setFocus();
     }
     else {
       if ( myDlg ) {
@@ -1045,8 +1047,6 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
     }
     QString tmpFolder = QDir::cleanDirPath( tempFolder->text().stripWhiteSpace() ) + TEMPDIRNAME;
     QString tgtFolder = QDir::cleanDirPath( targetFolder->text().stripWhiteSpace() );
-    qApp->sendPostedEvents();
-    qApp->processEvents();
     myThread->clearCommands();
     for ( unsigned i = 0; i < natives.count(); i++ ) {
       item = findItem( natives[ i ] );
@@ -1071,6 +1071,7 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
     }
     WarnDialog::showWarnDlg( this, true );
     myThread->start();
+    return true; // return in order to avoid default postValidateEvent() action
   }
   return InstallWizard::acceptData( pageTitle );
 }
@@ -1905,6 +1906,11 @@ void SALOME_InstallWizard::updateCaption()
 // ================================================================
 void SALOME_InstallWizard::processValidateEvent( const int val, void* data )
 {
+  QWidget* aPage = InstallWizard::currentPage();
+  if ( aPage != productsPage ) {
+    InstallWizard::processValidateEvent( val, data );
+    return;
+  }
   QCheckListItem* item = (QCheckListItem*)data;
   if ( val > 0 ) {
     if ( val == 2 ) {