- added a new global setting only accessible through the Tcl Shell,

named: global_mouse_pan_button
It can be set through set_sys TclCommand or the value getted through
get_sys TclCommand.
Values are 1 for left mouse button, 2 for middle mouse button and
3 for right mouse button.
It does hurt my hand (wrist) keeping the middle mouse button pressed
when panning and I very much preffer panning with RMB.
The default setting is pan_button = middle mouse button.
This commit is contained in:
Marius Stanciu
2018-06-01 21:05:51 +03:00
parent d4310a979c
commit b63c3219a7
2 changed files with 5 additions and 2 deletions

View File

@@ -445,7 +445,7 @@ class PlotCanvas(QtCore.QObject):
def on_mouse_press(self, event):
# Check for middle mouse button press
if event.button == 2:
if event.button == self.app.mouse_pan_button:
# Prepare axes for pan (using 'matplotlib' pan function)
self.pan_axes = []
@@ -461,7 +461,7 @@ class PlotCanvas(QtCore.QObject):
def on_mouse_release(self, event):
# Check for middle mouse button release to complete pan procedure
if event.button == 2:
if event.button == self.app.mouse_pan_button:
for a in self.pan_axes:
a.end_pan()