From: apo Date: Wed, 7 Dec 2005 12:56:51 +0000 (+0000) Subject: Fix for Bug GVIEW10640 X-Git-Tag: TG-D5-38-2003_D2005-20-12~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3b4558cc69fd711ef5aaed914a9bc8370972ad54;p=modules%2Fvisu.git Fix for Bug GVIEW10640 different navigation modes on the main and segmented view --- diff --git a/src/VVTK/VVTK_MainWindow.cxx b/src/VVTK/VVTK_MainWindow.cxx index 1a99a7ba..f71f4056 100644 --- a/src/VVTK/VVTK_MainWindow.cxx +++ b/src/VVTK/VVTK_MainWindow.cxx @@ -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))); +} + diff --git a/src/VVTK/VVTK_MainWindow.h b/src/VVTK/VVTK_MainWindow.h index 608b8cc0..631bb94b 100644 --- a/src/VVTK/VVTK_MainWindow.h +++ b/src/VVTK/VVTK_MainWindow.h @@ -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; + };