From: apo Date: Wed, 10 May 2006 08:23:50 +0000 (+0000) Subject: Fix for Bug12370 X-Git-Tag: T3_2_0b1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f176d788855c1f15c22bc91ccb80d01ef5e3ac4b;p=modules%2Fvisu.git Fix for Bug12370 Changing of Segmentaiton window background change the main window background (MKO) - Now the background colors of the main and segmentation viewes are synhronized --- diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index e8ce11e7..228c24d9 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -342,12 +342,15 @@ VisuGUI_Module:: onCreateViewManager() { SalomeApp_Application* anApp = getApp(); + SUIT_ResourceMgr* aResourceMgr = anApp->resourceMgr(); VVTK_ViewManager* aViewManager = new VVTK_ViewManager( anApp->activeStudy(), anApp->desktop() ); VVTK_Viewer* aViewer = (VVTK_Viewer*)aViewManager->getViewModel(); + aViewer->setBackgroundColor( aResourceMgr->colorValue( "VTKViewer", "background", aViewer->backgroundColor() ) ); + aViewer->setTrihedronSize( aResourceMgr->integerValue( "VTKViewer", "trihedron_size", aViewer->trihedronSize() ), + aResourceMgr->booleanValue( "VTKViewer", "relative_size", aViewer->trihedronRelative() ) ); new LightApp_VTKSelector( aViewer, anApp->selectionMgr() ); anApp->addViewManager( aViewManager ); - //aViewer->setBackgroundColor( Qt::darkGreen ); aViewManager->createViewWindow(); return aViewer->getViewManager(); diff --git a/src/VVTK/VVTK_ViewWindow.cxx b/src/VVTK/VVTK_ViewWindow.cxx index 0b012ab2..3494d32c 100755 --- a/src/VVTK/VVTK_ViewWindow.cxx +++ b/src/VVTK/VVTK_ViewWindow.cxx @@ -290,11 +290,7 @@ void VVTK_ViewWindow ::setBackgroundColor( const QColor& theColor ) { - if( myMainWindow1->GetInteractor()->hasFocus() ) - myMainWindow1->SetBackgroundColor( theColor ); - else if( myMainWindow2->GetInteractor()->hasFocus() ) - myMainWindow2->SetBackgroundColor( theColor ); - else - myMainWindow->SetBackgroundColor( theColor ); + myMainWindow1->SetBackgroundColor( theColor ); + myMainWindow2->SetBackgroundColor( theColor ); }