Process clicks on toggle buttons
(self, event)
| 82 | p.SetMinSize((wx.SIZE_AUTO_WIDTH, btn.GetSize()[1] + 5)) |
| 83 | |
| 84 | def toggleMetaButton(self, event): |
| 85 | """Process clicks on toggle buttons""" |
| 86 | clickedBtn = event.EventObject |
| 87 | |
| 88 | if wx.GetMouseState().GetModifiers() == wx.MOD_CONTROL: |
| 89 | activeBtns = [btn for btn in self.metaButtons if btn.GetValue()] |
| 90 | if activeBtns: |
| 91 | clickedBtn.setUserSelection(clickedBtn.GetValue()) |
| 92 | self.itemView.filterItemStore() |
| 93 | else: |
| 94 | # Do 'nothing' if we're trying to turn last active button off |
| 95 | # Keep button in the same state |
| 96 | clickedBtn.setUserSelection(True) |
| 97 | else: |
| 98 | for btn in self.metaButtons: |
| 99 | btn.setUserSelection(btn == clickedBtn) |
| 100 | |
| 101 | self.itemView.filterItemStore() |
| 102 | |
| 103 | def jump(self, item): |
| 104 | self.mode = 'normal' |
nothing calls this directly
no test coverage detected