fix(editor): via GetWidth layer fix + console tab/copy restore

- itemToJson: pass PADSTACK::ALL_LAYERS for vias — the layerless virtual
  PCB_VIA::GetWidth() is an assert trap since the padstack refactor, and the
  collab baseline/snapshot serializer hit it once per via per snapshot
  (big-board load = assert storm). Values were already correct; wire format
  unchanged (applyChanged's layerless SetWidth writes the same slot).
- console: closed state is a content-width bottom-left tab again (version
  badge + app bottom edge visible); opened footer panel unchanged.
- console: partial-selection copy works — wx's window-level keydown handler
  preventDefaults Ctrl/Cmd+C, so a capture-phase guard stops propagation to wx
  when the selection lives in the console; canvas mousedown collapses stale
  log selections so they can't steal the editor's own Ctrl+C.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HPtPBVLKQzaXTkirYgcVay
This commit is contained in:
Gergő Törcsvári 2026-08-17 12:33:21 +02:00
commit a0bbffe5c0
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
2 changed files with 76 additions and 25 deletions

View file

@ -276,7 +276,13 @@ json itemToJson( BOARD_ITEM* aItem )
j["sy"] = tr->GetStart().y;
j["ex"] = tr->GetEnd().x;
j["ey"] = tr->GetEnd().y;
j["width"] = tr->GetWidth();
// The layerless PCB_VIA::GetWidth() is an assert trap (padstack refactor); pass the
// whole-stack slot instead. applyChanged's layerless SetWidth writes the same slot.
if( aItem->Type() == PCB_VIA_T )
j["width"] = static_cast<PCB_VIA*>( aItem )->GetWidth( PADSTACK::ALL_LAYERS );
else
j["width"] = tr->GetWidth();
}
// Vias and zones reconstruct NATIVELY on `added` (the s-expr clipboard blob's `(kicad_pcb …)`