File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 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):
11551155 # Only do rectangle selection if event was triggered
11561156 # with a desired button
11571157 if self .validButtons is not None :
1158- if not event .button in self .validButtons :
1158+ if event .button not in self .validButtons :
11591159 return True
11601160
11611161 # If no button was pressed yet ignore the event if it was out
@@ -1164,7 +1164,7 @@ def ignore(self, event):
11641164 return event .inaxes != self .ax
11651165
11661166 # If a button was pressed, check if the release-button is the
1167- # same.
1167+ # same.
11681168 if event .button == self .eventpress .button :
11691169 return False
11701170
@@ -1217,7 +1217,7 @@ def press(self, event):
12171217
12181218 def release (self , event ):
12191219 """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 :
12211221 self .eventrelease = copy .copy (event )
12221222 self .eventrelease .xdata , self .eventrelease .ydata = (
12231223 self ._get_data (event ))
You can’t perform that action at this time.
0 commit comments