]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for Bug12370
authorapo <apo@opencascade.com>
Wed, 10 May 2006 08:23:50 +0000 (08:23 +0000)
committerapo <apo@opencascade.com>
Wed, 10 May 2006 08:23:50 +0000 (08:23 +0000)
   Changing of Segmentaiton window background change the main window background (MKO)
- Now the background colors of the main and segmentation viewes are synhronized

src/VISUGUI/VisuGUI_Module.cxx
src/VVTK/VVTK_ViewWindow.cxx

index e8ce11e73aa180bc7e879756506a472f4f973530..228c24d9f278150e6fb2788396286ea4af050800 100644 (file)
@@ -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();
index 0b012ab25093a1d92af169377c7539a0021d1378..3494d32c180457700798b85f59e700eb5d238985 100755 (executable)
@@ -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 );
 }