Skip to content

Commit

Permalink
Fixes for VTK 6.2.0
Browse files Browse the repository at this point in the history
This is related to PointCloudLibrary#712, they finally merged the patch Kitware/VTK@a3e9fc9 mentioned by @asmaloney.
  • Loading branch information
fran6co committed Apr 7, 2015
1 parent d0af48b commit 92a5c64
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,20 @@ - (void)windowWillClose:(NSNotification*)aNotification
vtkCocoaRenderWindow *renWin = vtkCocoaRenderWindow::SafeDownCast (this->GetRenderWindow ());
if (renWin != NULL)
{
#if ((VTK_MAJOR_VERSION < 6) || ((VTK_MAJOR_VERSION == 6) && (VTK_MINOR_VERSION < 2)))
vtkCocoaServerFix *server = reinterpret_cast<vtkCocoaServerFix*> (this->GetCocoaServer ());
if (!this->GetCocoaServer ())
#else
vtkCocoaServerFix *server = reinterpret_cast<vtkCocoaServerFix*> (renWin->GetCocoaServer ());
if (!renWin->GetCocoaServer ())
#endif
{
server = [vtkCocoaServerFix cocoaServerWithRenderWindow:renWin];
#if ((VTK_MAJOR_VERSION < 6) || ((VTK_MAJOR_VERSION == 6) && (VTK_MINOR_VERSION < 2)))
this->SetCocoaServer (reinterpret_cast<void*> (server));
#else
renWin->SetCocoaServer (reinterpret_cast<void*> (server));
#endif
}

[server start];
Expand All @@ -203,7 +212,11 @@ - (void)windowWillClose:(NSNotification*)aNotification
vtkCocoaRenderWindow *renWin = vtkCocoaRenderWindow::SafeDownCast (this->RenderWindow);
if (renWin)
{
#if ((VTK_MAJOR_VERSION < 6) || ((VTK_MAJOR_VERSION == 6) && (VTK_MINOR_VERSION < 2)))
vtkCocoaServerFix *server = reinterpret_cast<vtkCocoaServerFix*> (this->GetCocoaServer ());
#else
vtkCocoaServerFix *server = reinterpret_cast<vtkCocoaServerFix*> (renWin->GetCocoaServer ());
#endif
[server stop];
}
}
Expand Down

0 comments on commit 92a5c64

Please sign in to comment.