Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jan Zelenka
prasopes
Commits
d100d636
Commit
d100d636
authored
Oct 28, 2019
by
Yan
Browse files
Console does not block focus forever
* focus handling improved - when clicking on graph focus is released.
parent
2919cac9
Changes
1
Hide whitespace changes
Inline
Side-by-side
prasopes/graphtools.py
View file @
d100d636
...
...
@@ -160,6 +160,10 @@ def zoom_factory(axis, base_scale, plot_data=None):
def
pan_factory
(
axis
,
plot
=
None
):
"""pan spectrum when you press a button"""
def
pan_fun
(
event
,
ax
,
pd
):
#remove focus from other objects when clicking on graph
focusedWidget
=
QtWidgets
.
QApplication
.
focusWidget
()
if
focusedWidget
!=
None
and
event
.
inaxes
==
ax
:
focusedWidget
.
clearFocus
()
# re-scale to origin if doubleclicked
if
event
.
dblclick
and
event
.
inaxes
==
ax
:
ax
.
get_figure
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment