From: asl Date: Fri, 18 Jan 2008 07:58:34 +0000 (+0000) Subject: fix for bug: VVTK view's scene is not shown X-Git-Tag: before_mergefrom_BR_Dev_For_4_0_17Jan08 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0d415629ce011a29cd0eae148b0f3d88a7ef0eef;p=modules%2Fvisu.git fix for bug: VVTK view's scene is not shown --- diff --git a/src/VVTK/VVTK_ViewWindow.cxx b/src/VVTK/VVTK_ViewWindow.cxx index a1fe968d..52d48d4e 100755 --- a/src/VVTK/VVTK_ViewWindow.cxx +++ b/src/VVTK/VVTK_ViewWindow.cxx @@ -39,6 +39,8 @@ #include "SVTK_RenderWindowInteractor.h" #include "SVTK_GenericRenderWindowInteractor.h" +#include + #include #include #include @@ -58,14 +60,9 @@ VVTK_ViewWindow void VVTK_ViewWindow::Initialize(SVTK_ViewModelBase* theModel) { if(SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr()){ - QWidget* aWidget = new QWidget(this); - setCentralWidget(aWidget); - - QBoxLayout* aLayout = new QVBoxLayout(aWidget); - //aLayout->setAutoAdd(true); - QSplitter* aSplitter = new QSplitter(Qt::Vertical,aWidget); - //aSplitter->setChildrenCollapsible(true); - aLayout->addWidget( aSplitter ); + + QSplitter* s = new QSplitter( Qt::Vertical, this ); + setCentralWidget( s ); VISU_WidgetCtrl* aWidgetCtrl = NULL; VISU_InsideCursorSettings* anInsideCursorSettings = NULL; @@ -73,7 +70,7 @@ void VVTK_ViewWindow::Initialize(SVTK_ViewModelBase* theModel) VISU_PickingSettings* aPickingSettings = NULL; SVTK_Selector* aSelector = SVTK_Selector::New(); { - myMainWindow1 = new VVTK_MainWindow1(aSplitter, + myMainWindow1 = new VVTK_MainWindow1(s, "VVTK_MainWindow", aResourceMgr, this); @@ -112,9 +109,12 @@ void VVTK_ViewWindow::Initialize(SVTK_ViewModelBase* theModel) myView1 = new SVTK_View(myMainWindow1); SVTK_ViewWindow::Initialize(myView1,theModel); + + anIteractor->getRenderWindow()->Render(); + myMainWindow1->onResetView(); } { - myMainWindow2 = myMainWindow1->CreateMainWindow2(aSplitter, + myMainWindow2 = myMainWindow1->CreateMainWindow2(s, "VVTK_SegmantationWindow", aResourceMgr, this); @@ -147,6 +147,9 @@ void VVTK_ViewWindow::Initialize(SVTK_ViewModelBase* theModel) myView2 = new SVTK_View(myMainWindow2); SVTK_ViewWindow::Initialize(myView2,theModel); + + anIteractor->getRenderWindow()->Render(); + myMainWindow2->onResetView(); } aSelector->Delete(); @@ -154,7 +157,7 @@ void VVTK_ViewWindow::Initialize(SVTK_ViewModelBase* theModel) QList aSizes; aSizes.append( h ); aSizes.append( h ); - aSplitter->setSizes( aSizes ); + s->setSizes( aSizes ); myMainWindow2->hide(); myMainWindow = myMainWindow1;