Commit b8d01244 authored by Ingo Meyer's avatar Ingo Meyer

Merge branch 'develop'

parents 7b04ac31 39a99bca
......@@ -73,7 +73,8 @@ import numpy
import os.path
numpy_package_path = os.path.dirname(numpy.__file__)
print('-I{}'.format(os.path.join(numpy_package_path, 'core/include')))
EOF)
EOF
)
eval "${1}=\"${INC_FLAGS}\""
eval "${2}=\"\""
......
__version_info__ = (0, 9, 1)
__version_info__ = (0, 9, 2)
__version__ = '.'.join(map(str, __version_info__))
......@@ -69,15 +69,13 @@ class GLWidget(QOpenGLWidget if has_qopenglwidget else QGLWidget):
def wheelEvent(self, e):
self.update_needed = True
if e.modifiers() != QtCore.Qt.ShiftModifier:
if e.pixelDelta().y() != 0:
self.vis.zoom(-e.pixelDelta().y())
rot_v = 0.1
if e.modifiers() == QtCore.Qt.ShiftModifier:
if (e.angleDelta().x() != 0) or (e.angleDelta().y() != 0):
self.vis.rotate_mouse(-e.angleDelta().x() * rot_v, -e.angleDelta().y() * rot_v)
else:
rot_v = 0.1
if e.orientation() == QtCore.Qt.Horizontal:
self.vis.rotate_mouse(e.delta() * rot_v, 0)
else:
self.vis.rotate_mouse(0, e.delta() * rot_v)
if e.angleDelta().y() != 0:
self.vis.zoom(-e.angleDelta().y())
QtWidgets.QApplication.postEvent(self, UpdateGLEvent())
......
......@@ -98,10 +98,10 @@ class PDFWidget(QtWidgets.QWidget):
elembox.addWidget(QtWidgets.QLabel("Elements:", self), 0)
self.elem1 = QtWidgets.QComboBox(self)
self.elem1.setMinimumWidth(170)
elembox.addWidget(self.elem1, 0, QtCore.Qt.AlignLeft)
elembox.addWidget(self.elem1, 1)
self.elem2 = QtWidgets.QComboBox(self)
self.elem2.setMinimumWidth(170)
elembox.addWidget(self.elem2, 0, QtCore.Qt.AlignRight)
elembox.addWidget(self.elem2, 1)
grid.addLayout(elembox, 0, 0)
rangebox = QtWidgets.QHBoxLayout()
......@@ -113,7 +113,7 @@ class PDFWidget(QtWidgets.QWidget):
self.range2 = QtWidgets.QLineEdit("8", self)
self.range2.setMinimumWidth(30)
rangebox.addWidget(self.range2)
grid.addLayout(rangebox, 0, 1)
grid.addLayout(rangebox, 1, 0)
cutoffbox = QtWidgets.QHBoxLayout()
cutoffbox.addWidget(QtWidgets.QLabel("Kernel:", self))
......@@ -130,7 +130,7 @@ class PDFWidget(QtWidgets.QWidget):
self.bandwidth = QtWidgets.QLineEdit("", self)
self.bandwidth.setMinimumWidth(30)
cutoffbox.addWidget(self.bandwidth)
grid.addLayout(cutoffbox, 0, 2)
grid.addLayout(cutoffbox, 2, 0)
buttonbox = QtWidgets.QHBoxLayout()
......@@ -145,7 +145,7 @@ class PDFWidget(QtWidgets.QWidget):
self.export_data_button = QtWidgets.QPushButton("Export Data", self)
buttonbox.addWidget(self.export_data_button)
self.export_data_button.clicked.connect(self.export_data)
grid.addLayout(buttonbox, 1, 0, 1, 3)
grid.addLayout(buttonbox, 3, 0)
vbox.addWidget(self.gr_widget, stretch=1)
vbox.addWidget(self.datasetlabel, stretch=0)
......
......@@ -229,6 +229,7 @@ class Visualization(object):
"""
Refresh the OpenGL scene.
"""
self.assigned_opengl_context.makeCurrent()
self.width = width
self.height = height
self.set_camera(width, height)
......@@ -238,6 +239,7 @@ class Visualization(object):
gr3.usecurrentframebuffer()
gr3.drawimage(0, width*device_pixel_ratio, 0, height*device_pixel_ratio,
width, height, gr3.GR3_Drawable.GR3_DRAWABLE_OPENGL)
self.assigned_opengl_context.doneCurrent()
def save_screenshot(self, file_name, width=3840, height=2160, first=True, last=True):
"""
......
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