[iBoM] Fixed the name displayed in the HTML when using filters
- and/or variants
This commit is contained in:
parent
c4cc6371a8
commit
82b299a159
|
|
@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Missing XYRS information for components with multiple units (#306)
|
||||
- Schematic v6: Problems when creating a variant of a sub-sheet that was edited
|
||||
as a standalone sheet (#307)
|
||||
- iBoM: Name displayed in the HTML when using filters and/or variants.
|
||||
|
||||
### Changed
|
||||
- Diff:
|
||||
|
|
|
|||
|
|
@ -694,11 +694,11 @@ class VariantOptions(BaseOptions):
|
|||
return fname
|
||||
|
||||
@staticmethod
|
||||
def save_tmp_dir_board(id):
|
||||
def save_tmp_dir_board(id, force_dir=None):
|
||||
""" Save the PCB to a temporal dir.
|
||||
Disadvantage: all relative paths inside the file becomes useless
|
||||
Aadvantage: the name of the file remains the same """
|
||||
pcb_dir = mkdtemp(prefix='tmp-kibot-'+id+'-')
|
||||
pcb_dir = mkdtemp(prefix='tmp-kibot-'+id+'-') if force_dir is None else force_dir
|
||||
fname = os.path.join(pcb_dir, GS.pcb_basename+'.kicad_pcb')
|
||||
logger.debug('Storing modified PCB to `{}`'.format(fname))
|
||||
GS.board.Save(fname)
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ class IBoMOptions(VariantOptions):
|
|||
GS.sch.save_netlist(f, self._comps)
|
||||
# Write a board with the filtered values applied
|
||||
self.sch_fields_to_pcb(self._comps, GS.board)
|
||||
pcb_name = self.save_tmp_board(dir=net_dir)
|
||||
pcb_name, _ = self.save_tmp_dir_board('ibom', force_dir=net_dir)
|
||||
else:
|
||||
# Check if the user wants extra_fields but there is no data about them (#68)
|
||||
if self.need_extra_fields() and not os.path.isfile(self.extra_data_file):
|
||||
|
|
|
|||
Loading…
Reference in New Issue