Skip to content

Commit b338b82

Browse files
author
David Stirling
committed
Bind 'f' to fetch more tiles for Classifier
1 parent ae6cae8 commit b338b82

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cpa/classifier.py

+7
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ def OnClassifierChoice(self, event):
403403
self.SelectAlgorithm(selectedItem)
404404

405405
def OnSelectAlgorithm(self, event):
406+
if not isinstance(event.EventObject, wx.Menu):
407+
# Fix bug: The first bind we make likes to grab any event without a specific target.
408+
event.Skip()
409+
return
406410
selectedItem = re.sub('[\W_]+', '', self.classifierMenu.FindItemById(event.GetId()).GetItemLabel())
407411
self.SelectAlgorithm(selectedItem)
408412

@@ -502,6 +506,9 @@ def OnKey(self, evt):
502506
return
503507
self.unclassifiedBin.tiles[0].Select()
504508
return
509+
elif keycode == ord('F'):
510+
self.OnFetch(evt)
511+
return
505512
# convert from keycode to a channel index to match number keypress to channel
506513
# some keyboards match the number 1 to 325; others match 1 to 49
507514
# this conditional accounts for those differences

0 commit comments

Comments
 (0)