From 00dbbe427a8acfac89d62461900b289be8cde5f5 Mon Sep 17 00:00:00 2001 From: dmv Date: Mon, 3 Mar 2008 08:20:43 +0000 Subject: [PATCH] NPAL 18990 --- src/SUIT/SUIT_ViewManager.cxx | 11 +++++++++++ src/SUIT/SUIT_ViewManager.h | 1 + src/SalomeApp/SalomeApp_VisualState.cxx | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/SUIT/SUIT_ViewManager.cxx b/src/SUIT/SUIT_ViewManager.cxx index 619b9c488..27a7e1e50 100755 --- a/src/SUIT/SUIT_ViewManager.cxx +++ b/src/SUIT/SUIT_ViewManager.cxx @@ -188,6 +188,17 @@ void SUIT_ViewManager::removeView(SUIT_ViewWindow* theView) emit lastViewClosed(this); } +/*! + Returns 'true' if any of views (view windows) is visible. +*/ +bool SUIT_ViewManager::isVisible() const +{ + bool res = false; + for ( uint i = 0; i < myViews.count() && !res; i++ ) + res = myViews[i]->isVisibleTo( myViews[i]->parentWidget() ); + return res; +} + /*! Show or hide all views (view windows) */ diff --git a/src/SUIT/SUIT_ViewManager.h b/src/SUIT/SUIT_ViewManager.h index 8cacbe253..5114658e2 100755 --- a/src/SUIT/SUIT_ViewManager.h +++ b/src/SUIT/SUIT_ViewManager.h @@ -64,6 +64,7 @@ public: SUIT_ViewWindow* createViewWindow(); + bool isVisible() const; virtual void setShown( const bool ); public slots: diff --git a/src/SalomeApp/SalomeApp_VisualState.cxx b/src/SalomeApp/SalomeApp_VisualState.cxx index dab9a907e..08afaedda 100644 --- a/src/SalomeApp/SalomeApp_VisualState.cxx +++ b/src/SalomeApp/SalomeApp_VisualState.cxx @@ -217,13 +217,13 @@ void SalomeApp_VisualState::restoreState(int savePoint) //Resize the views, set their captions and apply visual parameters. QPtrVector views = vm->getViews(); - for (int i = 0, j = 0; iisVisible() ) + while ( !vm->isVisible() ) qApp->processEvents(); viewWin->setCaption(ip->getValue(viewerEntry, j).c_str()); -- 2.39.2