Skip to content

Commit

Permalink
Re-allows VTK cells to export PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Apr 8, 2014
1 parent f0eb9c5 commit 4ed7580
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion vistrails/packages/vtk/vtkcell.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# VTK/GUISupport/QVTK. Combine altogether to a single class: QVTKWidget
################################################################################
import vtk
import os
from PyQt4 import QtCore, QtGui
import sip
from vistrails.core import system
Expand Down Expand Up @@ -983,7 +984,11 @@ def dumpToFile(self, filename):
"""dumpToFile() -> None
Dumps itself as an image to a file, calling saveToPNG
"""
self.saveToPNG(filename)
ext = os.path.splitext(filename)[1].lower()
if ext == '.pdf':
self.saveToPDF(filename)
else:
self.saveToPNG(filename)

class QVTKWidgetSaveCamera(QtGui.QAction):
"""
Expand Down
7 changes: 6 additions & 1 deletion vistrails/packages/vtk/vtkviewcell.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# VTK/GUISupport/QVTK. Combine altogether to a single class: QVTKViewWidget
################################################################################
import vtk
import os
from PyQt4 import QtCore, QtGui
import sip
from vistrails.core import system
Expand Down Expand Up @@ -889,7 +890,11 @@ def dumpToFile(self, filename):
"""dumpToFile() -> None
Dumps itself as an image to a file, calling saveToPNG
"""
self.saveToPNG(filename)
ext = os.path.splitext(filename)[1].lower()
if ext == '.pdf':
self.saveToPDF(filename)
else:
self.saveToPNG(filename)

class QVTKViewWidgetSaveCamera(QtGui.QAction):
"""
Expand Down

0 comments on commit 4ed7580

Please sign in to comment.