← Commit history

demo: stop the library card promising a part it never shows (kicad_show_library loads no part by design)

John Lauer ·9487b12cae ·2mo ago ·parent 220cb9d
1 file changed +2−1
web-control-demo.html+2−1
@@ -1593,6 +1593,7 @@ for (const w of mine) {           if (PART.kicadFootprintName !== PART.name) clog(c, "  footprint registered as '" + PART.kicadFootprintName + "' (not '" + PART.name + "')");         }         clog(c, "  installed footprint; the bridge wired the 3D model reference (0.9.108 model arg)");+       });     });     _kicadPart.catch(function () { _kicadPart = null; }); // a failed staging retries on the next click@@ -1634,7 +1635,7 @@ for (const w of mine) {     { label: function () { return "Symbol (" + PART.name + ")"; }, cmd: "kicad_show_symbol", args: function () { return { symbolName: PART.kicadSymbolName || PART.name, libraryName: PART.kicadLib }; }, stage: stageKicadPart, pick: "symbol editor", note: "installs the part from its wiki page, then shows JUST the symbol" },     { label: function () { return "Footprint (" + PART.name + ")"; }, cmd: "kicad_show_footprint", args: function () { return { footprintName: PART.kicadFootprintName || PART.name, library: PART.kicadLib }; }, stage: stageKicadPart, pick: "footprint editor", note: "just the land pattern: pads + courtyard" },     { label: function () { return "3D chip (" + PART.name + ")"; }, cmd: "kicad_show_3d_chip", args: function () { return { footprintName: PART.kicadFootprintName || PART.name, library: PART.kicadLib }; }, stage: stageKicadPart, pick: "3d viewer", note: "the part's STEP model on its footprint" },-    { label: function () { return "Library (" + PART.name + " in '" + PART.kicadLib + "')"; }, cmd: "kicad_show_library", args: function () { return { libraryName: PART.kicadLib }; }, stage: stageKicadPart, pick: "symbol editor", note: "browses the library TREE - by design this verb loads NO part (kicad_show_library: \"no part loaded\"), so the editor window keeps showing whichever symbol was already open. A leftover name in the shot below is that, not this part." },+    { label: function () { return "Library tree ('" + PART.kicadLib + "') - loads no part"; }, cmd: "kicad_show_library", args: function () { return { libraryName: PART.kicadLib }; }, stage: stageKicadPart, pick: "symbol editor", note: "EXPECT A DIFFERENT PART IN THE SHOT BELOW. This verb browses the library TREE and by design loads NO part, so the editor keeps showing whatever symbol it already had (usually ADOM_MECHANICAL_PIN, which sorts first). Measured across a 10-part run: the symbol, footprint and 3D shots are all 10/10 unique, while this one is byte-identical for 8 of 10 parts. That is the verb behaving correctly, not a stale file - which is why the label no longer names the part." },     { label: function () { return "Schematic (just the " + PART.name + ")"; }, cmd: "kicad_show_schematic", args: function () { return { filePath: (PART.kicadProject || {}).schPath }; }, stage: stageKicadProject, pick: "schematic editor", note: "the generated single-component schematic (kicad_make_part_project)" },     { label: "2D board (part placed, tight edge cuts)", cmd: "kicad_show_2d_board", args: function () { return { filePath: (PART.kicadProject || {}).pcbPath }; }, stage: stageKicadProject, pick: "pcb editor", note: "the part-dominant board" },     { label: "3D board (real 3D body on the board)", cmd: "kicad_show_3d_board", args: function () { return { filePath: (PART.kicadProject || {}).pcbPath }; }, stage: stageKicadProject, pick: "3d viewer", note: "the populated board in 3D - the whole ladder underneath it" },