Commit a978b7a2 authored by Clinton Stimpson's avatar Clinton Stimpson
Browse files

Fix possible crash in Qt GraphicsView example.

vtkRenderView needs to be initialized differently now, and only
giving it the vtkRenderWindow is sufficient.  Otherwise, we get
two windows with one interactor.

Change-Id: I7d470e3f926689ca110532043bc8d1dcad1d5ce7
parent 02aac437
......@@ -19,7 +19,6 @@ GraphLayoutViewItem::GraphLayoutViewItem(QGLContext* ctx, QGraphicsItem* p)
: QVTKGraphicsItem(ctx, p)
{
GraphLayoutView.TakeReference(vtkGraphLayoutView::New());
GraphLayoutView->SetInteractor(this->GetInteractor());
GraphLayoutView->SetRenderWindow(this->GetRenderWindow());
QFile f1(":/Data/treetest.xml");
......
......@@ -19,7 +19,6 @@ TreeRingViewItem::TreeRingViewItem(QGLContext* ctx, QGraphicsItem* p)
this->setPalette(pal);
TreeRingView.TakeReference(vtkTreeRingView::New());
TreeRingView->SetInteractor(this->GetInteractor());
TreeRingView->SetRenderWindow(this->GetRenderWindow());
QFile f1(":/Data/vtkclasses.xml");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment