File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1155,7 +1155,7 @@ def ignore(self, event):
1155
1155
# Only do rectangle selection if event was triggered
1156
1156
# with a desired button
1157
1157
if self .validButtons is not None :
1158
- if not event .button in self .validButtons :
1158
+ if event .button not in self .validButtons :
1159
1159
return True
1160
1160
1161
1161
# If no button was pressed yet ignore the event if it was out
@@ -1164,7 +1164,7 @@ def ignore(self, event):
1164
1164
return event .inaxes != self .ax
1165
1165
1166
1166
# If a button was pressed, check if the release-button is the
1167
- # same.
1167
+ # same.
1168
1168
if event .button == self .eventpress .button :
1169
1169
return False
1170
1170
@@ -1217,7 +1217,7 @@ def press(self, event):
1217
1217
1218
1218
def release (self , event ):
1219
1219
"""Button release event"""
1220
- if not self .ignore (event ) and not self .eventpress is None :
1220
+ if not self .ignore (event ) and self .eventpress is not None :
1221
1221
self .eventrelease = copy .copy (event )
1222
1222
self .eventrelease .xdata , self .eventrelease .ydata = (
1223
1223
self ._get_data (event ))
You can’t perform that action at this time.
0 commit comments