From 135fdd88125375a8546ef24693b5b5b069dd3d2e Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Mon, 15 Dec 2025 23:12:17 +0100 Subject: [PATCH] Make the slot filters a toggle instead of radio --- gui/marketBrowser.py | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/gui/marketBrowser.py b/gui/marketBrowser.py index 6df9c6454..98097a4ec 100644 --- a/gui/marketBrowser.py +++ b/gui/marketBrowser.py @@ -144,30 +144,9 @@ class MarketBrowser(wx.Panel): """Process clicks on slot/fits filter buttons""" clickedBtn = event.EventObject - # Fits button works as a checkbox (independent toggle) - if clickedBtn.filterType == "fits": - clickedBtn.setUserSelection(clickedBtn.GetValue()) - self.itemView.filterItemStore() - return - - # Slot buttons (High/Med/Low) work as radio buttons (mutually exclusive) - if wx.GetMouseState().GetModifiers() == wx.MOD_CONTROL: - # Get only slot buttons (not fits) - activeSlotBtns = [btn for btn in self.slotButtons if btn.GetValue() and btn.filterType == "slot"] - if activeSlotBtns: - clickedBtn.setUserSelection(clickedBtn.GetValue()) - self.itemView.filterItemStore() - else: - # Do 'nothing' if we're trying to turn last active button off - # Keep button in the same state - clickedBtn.setUserSelection(True) - else: - # Deselect all slot buttons, then select clicked one - for btn in self.slotButtons: - if btn.filterType == "slot": - btn.setUserSelection(btn == clickedBtn) - - self.itemView.filterItemStore() + # All buttons (Fits, High, Med, Low, Rig) work as checkboxes (independent toggles) + clickedBtn.setUserSelection(clickedBtn.GetValue()) + self.itemView.filterItemStore() def getFitsFilter(self): """Check if Fits button is active"""