mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
deal with conflicts between onpick and rect select in Profile plot
This commit is contained in:
1 parent
fe57890da4
commit
c6b28ba3a0
4 files changed
+49
-44
No files matched your search
@@ -82,6 +82,7 @@ class PamhyrPlot(APlot):
|
||||
connector = {
|
||||
'pick_event': self.onpick,
|
||||
'button_press_event': self.onclick,
|
||||
'button_release_event': self.onrelease,
|
||||
}
|
||||
|
||||
for event in connector:
|
||||
@@ -109,8 +110,8 @@ class PamhyrPlot(APlot):
|
||||
onselect=self.rect_select_callback,
|
||||
useblit=True,
|
||||
button=[1], # don't use middle nor right button
|
||||
minspanx=1.0,
|
||||
minspany=1.0,
|
||||
minspanx=2.0,
|
||||
minspany=2.0,
|
||||
spancoords='pixels',
|
||||
interactive=False)
|
||||
|
||||
@@ -245,6 +246,9 @@ class PamhyrPlot(APlot):
|
||||
def onclick(self, event):
|
||||
return
|
||||
|
||||
def onrelease(self, event):
|
||||
return
|
||||
|
||||
def rect_select_callback(self, eclick, erelease):
|
||||
'eclick and erelease are the press and release events'
|
||||
x1, y1 = eclick.xdata, eclick.ydata
|
||||
|
||||
Reference in new issue
Block a user