#include "SVTK_RenderWindowInteractor.h"
#include "SVTK_GenericRenderWindowInteractor.h"
+#include <vtkRenderWindow.h>
+
#include <QLayout>
#include <QList>
#include <QSplitter>
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;
VISU_PickingSettings* aPickingSettings = NULL;
SVTK_Selector* aSelector = SVTK_Selector::New();
{
- myMainWindow1 = new VVTK_MainWindow1(aSplitter,
+ myMainWindow1 = new VVTK_MainWindow1(s,
"VVTK_MainWindow",
aResourceMgr,
this);
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);
myView2 = new SVTK_View(myMainWindow2);
SVTK_ViewWindow::Initialize(myView2,theModel);
+
+ anIteractor->getRenderWindow()->Render();
+ myMainWindow2->onResetView();
}
aSelector->Delete();
QList<int> aSizes;
aSizes.append( h );
aSizes.append( h );
- aSplitter->setSizes( aSizes );
+ s->setSizes( aSizes );
myMainWindow2->hide();
myMainWindow = myMainWindow1;