[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)
|
- Missing XYRS information for components with multiple units (#306)
|
||||||
- Schematic v6: Problems when creating a variant of a sub-sheet that was edited
|
- Schematic v6: Problems when creating a variant of a sub-sheet that was edited
|
||||||
as a standalone sheet (#307)
|
as a standalone sheet (#307)
|
||||||
|
- iBoM: Name displayed in the HTML when using filters and/or variants.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Diff:
|
- Diff:
|
||||||
|
|
|
||||||
|
|
@ -694,11 +694,11 @@ class VariantOptions(BaseOptions):
|
||||||
return fname
|
return fname
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def save_tmp_dir_board(id):
|
def save_tmp_dir_board(id, force_dir=None):
|
||||||
""" Save the PCB to a temporal dir.
|
""" Save the PCB to a temporal dir.
|
||||||
Disadvantage: all relative paths inside the file becomes useless
|
Disadvantage: all relative paths inside the file becomes useless
|
||||||
Aadvantage: the name of the file remains the same """
|
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')
|
fname = os.path.join(pcb_dir, GS.pcb_basename+'.kicad_pcb')
|
||||||
logger.debug('Storing modified PCB to `{}`'.format(fname))
|
logger.debug('Storing modified PCB to `{}`'.format(fname))
|
||||||
GS.board.Save(fname)
|
GS.board.Save(fname)
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ class IBoMOptions(VariantOptions):
|
||||||
GS.sch.save_netlist(f, self._comps)
|
GS.sch.save_netlist(f, self._comps)
|
||||||
# Write a board with the filtered values applied
|
# Write a board with the filtered values applied
|
||||||
self.sch_fields_to_pcb(self._comps, GS.board)
|
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:
|
else:
|
||||||
# Check if the user wants extra_fields but there is no data about them (#68)
|
# 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):
|
if self.need_extra_fields() and not os.path.isfile(self.extra_data_file):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue