Fixed rot_footprint filter reset.

This commit is contained in:
Salvador E. Tropea 2020-12-29 12:33:50 -03:00
parent a5681d38e1
commit 5d6bdeb9e2
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,6 @@ class GS(object):
kicad_version_major = 0
kicad_version_minor = 0
kicad_version_patch = 0
board_comps_joined = False # Flag to indicate we already merged data from the board
# Data from the SCH because it doesn't have a Python API
sch_title = None
sch_date = None

View File

@ -189,7 +189,9 @@ def load_sch():
def get_board_comps_data(comps):
if GS.board_comps_joined or not GS.pcb_file:
""" Add information from the PCB to the list of components from the schematic.
Note that we do it every time the function is called to reset transformation filters like rot_footprint. """
if not GS.pcb_file:
return
if not GS.board:
load_board()
@ -219,7 +221,6 @@ def get_board_comps_data(comps):
c.tht = True
if attrs & MOD_VIRTUAL == MOD_VIRTUAL:
c.virtual = True
GS.board_comps_joined = True
def preflight_checks(skip_pre):