From 23e0869f6f3680ec88dbc6f94d6862d0545383bf Mon Sep 17 00:00:00 2001 From: asl Date: Wed, 19 Nov 2008 12:24:23 +0000 Subject: [PATCH] Internal 19901 - crash on restore of GUI states --- src/VISUGUI/VisuGUI_Module.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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() ); -- 2.39.2