Skip to content

Commit

Permalink
Improve default search string
Browse files Browse the repository at this point in the history
Don't search for the existing LCSC value -- if I'm searching, that's
presumably the only part I don't want!

Tweak the search string to make it easier to find passives quickly.
  • Loading branch information
wrs committed Nov 10, 2024
1 parent 7cb78a5 commit 8486b35
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,10 +812,13 @@ def select_part(self, *_):
ref = self.partlist_data_model.get_reference(item)
lcsc = self.partlist_data_model.get_lcsc(item)
value = self.partlist_data_model.get_value(item)
if lcsc != "":
selection[ref] = lcsc
else:
selection[ref] = value
footprint = self.partlist_data_model.get_footprint(item)
if ref.startswith("R"):
value += "Ω"
m = re.search(r"_(\d+)_\d+Metric", footprint)
if m:
value += f" {m.group(1)}"
selection[ref] = value
PartSelectorDialog(self, selection).ShowModal()

def check_order_number(self):
Expand Down

0 comments on commit 8486b35

Please sign in to comment.