Fly-in interactor feature is broken for QVTKRenderWindowInteractor on a retina display
The "fly-in" feature triggered by hitting key 'f' in a render window using a QVTKRenderWindowInteractor currently is broken for retina display. For a non-retina display on Mac, the problem is not present.
System:
- MacBook Pro (Retina, 15-inch, Mid 2015), MacOS 10.11.6
- vtk-git (97e306e4, master branch, May 14) built with python and qt support, see configuration below
How to reproduce:
- Run QVTKRenderWidgetConeExample (see code snippet below)
- Hover over centre of widget and hit 'f'. Observation: the current view doesn't zoom closer to point under the mouse.
- Reset by hitting key 'r'.
- Hover over the top right of the widget and hit 'f': Observation: now the widget does zoom into centre of the view.
Code snippet to reproduce the problem:
from vtk.qt import QVTKRenderWindowInteractor as qvtk
qvtk.QVTKRenderWidgetConeExample()
Configuration of VTK:
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release \
-DVTK_WRAP_PYTHON=ON \
-DBUILD_EXAMPLES=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX="$VTK_INSTALL_DIR" \
-DCMAKE_MACOSX_RPATH=ON \
-DCMAKE_INSTALL_RPATH="$VTK_INSTALL_DIR/lib" \
-DPYTHON_INCLUDE_DIR="/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/" \
-DPYTHON_LIBRARY="/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib" \
-DVTK_Group_Qt=ON \
-DVTK_QT_VERSION=5 \
-DCMAKE_PREFIX_PATH="$QT_DIR/.."
ninja
ninja install
# Fix the Qt dependencies.
install_name_tool -change @rpath/QtWidgets.framework/Versions/5/QtWidgets \
$DEVPATH/lib/qt/QtWidgets.framework/Versions/5/QtWidgets \
"$VTK_INSTALL_DIR/lib/libvtkRenderingQt-7.1.1.dylib"
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore \
$DEVPATH/lib/qt/QtCore.framework/Versions/5/QtCore \
"$VTK_INSTALL_DIR/lib/libvtkRenderingQt-7.1.1.dylib"
install_name_tool -change @rpath/QtGui.framework/Versions/5/QtGui \
$DEVPATH/lib/qt/QtGui.framework/Versions/5/QtGui \
"$VTK_INSTALL_DIR/lib/libvtkRenderingQt-7.1.1.dylib"