fix: use _elements.remove() for kicad-skip collections lacking remove method

ElementCollection in kicad-skip doesn't implement remove(), causing
'WireCollection object has no attribute remove' errors. Access the
underlying _elements list directly for wire, label, and symbol deletion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Eugene Mikhantyev
2026-03-13 00:27:17 +00:00
parent ffe51f0f16
commit 2956b4fa9d
2 changed files with 3 additions and 3 deletions

View File

@@ -253,7 +253,7 @@ class ComponentManager:
break
if symbol_to_remove:
schematic.symbol.remove(symbol_to_remove)
schematic.symbol._elements.remove(symbol_to_remove)
print(f"Removed component {component_ref} from schematic.")
return True
else: