From: asl Date: Wed, 19 Nov 2008 12:24:23 +0000 (+0000) Subject: Internal 19901 - crash on restore of GUI states X-Git-Tag: V4_1_0_maintainance_20081128~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=23e0869f6f3680ec88dbc6f94d6862d0545383bf;p=modules%2Fvisu.git Internal 19901 - crash on restore of GUI states --- diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index ee68cf03..a641921e 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -1848,21 +1848,24 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint) std::vector::iterator namesIt = paramNames.begin(); std::vector::iterator valuesIt = paramValues.begin(); - if ( *entIt == "GaussViewer" ) { + if ( *entIt == "GaussViewer" ) + { // parameter names are view window's captions, values - visual parameters. - for ( ; namesIt != paramNames.end(); ++namesIt, ++valuesIt ) { + for ( ; namesIt != paramNames.end(); ++namesIt, ++valuesIt ) + { SUIT_ViewManager* vman = onCreateViewManager(); SUIT_ViewWindow* vwin = vman->getActiveView(); + vwin->show(); vwin->setCaption( (*namesIt).c_str() ); // wait untill the window is really shown. This step fixes MANY bugs.. - while ( !vwin->isVisible() ) + while ( !vman->isVisible() ) qApp->processEvents(); vwin->setVisualParameters( (*valuesIt).c_str() ); } continue; // skip to next entry - } + } // entry is a normal entry - it should be "decoded" (setting base adress of component) QString entry( ip->decodeEntry( *entIt ).c_str() );