Skip to content

Commit

Permalink
fix nested hierarchy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MitjaNemec committed Feb 26, 2023
1 parent b31237e commit 18bc5fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ place_footprints_light.png
initial_dialog_GUI.py
place_by_reference_GUI.py
place_by_sheet_GUI.py
error_dialog_GUI.py
/place_footprints_test_projects/place_footprints-backups
/place_footprints_test_projects/fp-info-cache
/place_footprints_test_projects/place_footprints_test_sheet_matrix.kicad_pro
Expand Down
10 changes: 6 additions & 4 deletions action_place_footprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,12 +473,14 @@ def Run(self):
# get the sheet_id's selected for placement
sheets_to_place_indices = dlg.list_sheets.GetSelections()
sheets_to_place = [dlg.list_sheetsChoices[i] for i in sheets_to_place_indices]
logger.info("Sheets selected: " + repr(sheets_to_place))

# get footprints for placement
fp_references = [ref_fp_ref]
for fp in footprints_with_same_id:
if fp.sheet_id in sheets_to_place:
fp_references.append(fp.ref)
for sheet in sheets_to_place:
for fp in footprints_with_same_id:
if "/".join(sheet) in "/".join(fp.sheet_id):
fp_references.append(fp.ref)
break

logger.info("Footprints to place: " + repr(fp_references))
# sort by reference number
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.1
2.0.2

0 comments on commit 18bc5fd

Please sign in to comment.