mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-03 17:34:12 +02:00
ec262d1af9
XmlElementCollection::importCategory() returned the project collection's first category, taken to be "import". A project can hold other top-level categories before it: examples/lmdg.qet has "k_elem" first. Imported symbols were then filed under k_elem/, while every lookup of an imported symbol is under import/ (QETProject::importElement(), XmlElementCollection::addElement()). The first placement worked; the second could not find the copy, tried to import it again and failed. In the editor the drop silently placed nothing; a script's qet.addElement() returned "". Look the category up by name, falling back to the first one as before when a project has none called "import". Test: tst_importcategory places the same symbol twice in a copy of lmdg.qet through --run. It fails without the fix (the second placement returns "") and passes with it. ctest 45/45. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>