[KiCanvas] Multiple sheets fix
Sort of ... looks like you must explicitly list the sub-sheets, but it has various drawbacks, look here: theacodes/kicanvas#77 Should fix the issue mentioned by @bluespider42 in #572
This commit is contained in:
parent
144a83d73d
commit
6315728692
|
|
@ -149,12 +149,13 @@ class KiCanvasOptions(VariantOptions):
|
||||||
f.write(f' <kicanvas-embed controls="{self.controls}"{controlslist}>\n')
|
f.write(f' <kicanvas-embed controls="{self.controls}"{controlslist}>\n')
|
||||||
for s in self.source:
|
for s in self.source:
|
||||||
if s == 'pcb':
|
if s == 'pcb':
|
||||||
source = GS.pcb_fname
|
f.write(f' <kicanvas-source src="{GS.pcb_fname}"></kicanvas-source>\n')
|
||||||
elif s == 'schematic':
|
elif s == 'schematic':
|
||||||
source = GS.sch_fname
|
GS.sch_dir
|
||||||
|
for s in sorted(GS.sch.all_sheets, key=lambda x: x.sheet_path_h):
|
||||||
|
f.write(f' <kicanvas-source src="{os.path.relpath(s.fname, GS.sch_dir)}"></kicanvas-source>\n')
|
||||||
else:
|
else:
|
||||||
source = GS.pro_fname
|
f.write(f' <kicanvas-source src="{GS.pro_fname}"></kicanvas-source>\n')
|
||||||
f.write(f' <kicanvas-source src="{source}"></kicanvas-source>\n')
|
|
||||||
f.write(' </kicanvas-embed>\n')
|
f.write(' </kicanvas-embed>\n')
|
||||||
f.write(' </body>\n')
|
f.write(' </body>\n')
|
||||||
f.write('</html>\n')
|
f.write('</html>\n')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue