]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for Bug GVIEW10640
authorapo <apo@opencascade.com>
Wed, 7 Dec 2005 12:56:51 +0000 (12:56 +0000)
committerapo <apo@opencascade.com>
Wed, 7 Dec 2005 12:56:51 +0000 (12:56 +0000)
   different navigation modes on the main and segmented view

src/VVTK/VVTK_MainWindow.cxx
src/VVTK/VVTK_MainWindow.h

index 1a99a7ba9949f7905cebb577cc412a8c02d9403f..f71f4056b18308f986e95f64dc7ba9155613c245 100644 (file)
@@ -436,7 +436,6 @@ void VVTK_MainWindow1::OnSegmentationSwitch()
 }
 
 
-
 //----------------------------------------------------------------------------
 VVTK_MainWindow2
 ::VVTK_MainWindow2(QWidget* theParent, 
@@ -444,14 +443,26 @@ VVTK_MainWindow2
                   SUIT_ResourceMgr* theResourceMgr,
                   VISU_PickingSettings* thePickingSettings,
                   QtxAction* theStyleSwitchAction):
-  VVTK_MainWindow(theParent,theName,theResourceMgr)
+  VVTK_MainWindow(theParent,theName,theResourceMgr),
+  myStyleSwitchAction(theStyleSwitchAction)
 {
   myInteractorStyle->SetPickingSettings(thePickingSettings);
-
-  connect(theStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
 }
 
 VVTK_MainWindow2
 ::~VVTK_MainWindow2()
 {}
 
+
+//----------------------------------------------------------------------------
+void
+VVTK_MainWindow2
+::Initialize(SVTK_RenderWindowInteractor* theInteractor)
+{
+  VVTK_MainWindow::Initialize(theInteractor);
+
+  if( myStyleSwitchAction->isOn() )
+    PushInteractorStyle(myInteractorStyle.GetPointer());
+  connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
+}
+
index 608b8cc0751c2f615f70c5154d5d9c982dd3ebcd..631bb94ba487e2f829b8a84eacc02566b0100b6d 100644 (file)
@@ -183,6 +183,16 @@ public:
   //! Destroy instance of the class
   virtual
   ~VVTK_MainWindow2();
+
+  //! Reimplement SVTK_MainWindow::Initialize
+  virtual
+  void
+  Initialize(SVTK_RenderWindowInteractor* theInteractor);
+
+ protected:
+  // Refer to the VVTK_MainWindow1::myStyleSwitchAction instance
+  QtxAction* myStyleSwitchAction; 
+
 };