diff --git a/.gitignore b/.gitignore index a6793f5..d6aa429 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ metadata_package.json metadata.json replicate_layout_test_project replicate_layout_fp_text +/replicate_issue_2 diff --git a/action_replicate_layout.py b/action_replicate_layout.py index f954e0b..c10f49c 100644 --- a/action_replicate_layout.py +++ b/action_replicate_layout.py @@ -274,7 +274,7 @@ def defaults(self): def Run(self): # grab PCB editor frame - self.frame = wx.FindWindowById(pcbnew.ID_V_TOOLBAR).GetParent() + self.frame = wx.FindWindowByName("PcbFrame") # load board board = pcbnew.GetBoard() @@ -321,6 +321,7 @@ def Run(self): # prepare the replicator logger.info("Preparing replicator with " + src_anchor_fp_reference + " as a reference") + # TODO return if replication is not possible at all try: replicator = Replicator(board) except LookupError as exception: @@ -367,6 +368,7 @@ def Run(self): # show dialog logger.info("Showing dialog") dlg = ReplicateLayoutDialog(self.frame, replicator, src_anchor_fp_reference, logger) + dlg.CenterOnParent() # find position of right toolbar toolbar_pos = self.frame.FindWindowById(pcbnew.ID_V_TOOLBAR).GetScreenPosition() @@ -380,3 +382,5 @@ def Run(self): dlg.SetPosition(dialog_position) dlg.Show() + + diff --git a/metadata_source.json b/metadata_source.json index 0aa8926..2ca3fe0 100644 --- a/metadata_source.json +++ b/metadata_source.json @@ -49,6 +49,20 @@ "windows" ] }, + { + "version": "1.0.2", + "status": "stable", + "kicad_version": "6.0", + "download_url": "https://github.com/MitjaNemec/ReplicateLayout/releases/download/1.0.2/ReplicateLayout-1.0.2-pcm.zip", + "download_sha256": "2c87066c7348842f32d4ca3208c1f6b33416d6ee1882a23744649cc0afb18546", + "download_size": 26702, + "install_size": 89002, + "platforms": [ + "linux", + "macos", + "windows" + ] + }, { "version": "VERSION", "status": "stable", diff --git a/replicate_layout.py b/replicate_layout.py index e298c57..5332ab1 100644 --- a/replicate_layout.py +++ b/replicate_layout.py @@ -128,6 +128,7 @@ def __init__(self, board, update_func=update_progress): ref=fp.GetReference()) self.footprints.append(fp_tuple) pass + # TODO check if there is any other footprint fit same ID as anchor footprint def replicate_layout(self, src_anchor_fp, level, dst_sheets, containing, remove, tracks, zones, text, drawings, rm_duplicates, rep_locked, by_group): diff --git a/version.txt b/version.txt index e6d5cb8..e4c0d46 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.2 \ No newline at end of file +1.0.3 \ No newline at end of file