Salome HOME
Fix problem of restore GUI state
authorvsr <vsr@opencascade.com>
Tue, 17 Sep 2013 13:00:09 +0000 (13:00 +0000)
committervsr <vsr@opencascade.com>
Tue, 17 Sep 2013 13:00:09 +0000 (13:00 +0000)
src/SalomeApp/SalomeApp_VisualState.cxx

index 253e8f2971775eeabdc00180f48cf08436d92910..eb566553fbb8294b453bce31e0c8f7c45072eb19 100644 (file)
@@ -264,6 +264,8 @@ void SalomeApp_VisualState::restoreState(int savePoint)
     }
   }
 
+  qApp->processEvents( QEventLoop::ExcludeUserInputEvents, 5000 );
+
   // restore modules' visual parameters
   std::vector<std::string> v = ip->getValues( "AP_MODULES_LIST" );
   for ( int i = 0; i < v.size(); i++ )
@@ -305,7 +307,7 @@ void SalomeApp_VisualState::restoreState(int savePoint)
   // so the same views will get the same names.
   nameViewWindows( lst );
 
-  qApp->processEvents();
+  qApp->processEvents( QEventLoop::ExcludeUserInputEvents, 5000 );
 
   // restore workstack parameters.  should be done after module's restoreVisualParameters(), because
   // some modules can create their own viewers (like VISU creates GaussViewers)