mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-27 20:44:13 +02:00
65299e1178
autoNums(kind) list contexts and their formulas addAutoNum(kind, name, parts) define one; parts are "type[:value[:increase]]" removeAutoNum(kind, name) useConductorAutoNum(folio, n) new conductors on a folio take it Kinds are conductor, element and folio. Part types are the ones the auto-numbering dialog offers; anything NumerotationContext rejects, an unknown kind, a non-numeric increase or a missing context is refused with a reason rather than dropped. Defining and removing a context is not undoable, because the application does it through direct project calls; only the counter advance is on the undo stack. useConductorAutoNum sets both the folio's name and the project's current name, because the numbering code reads the context by one and writes the advanced counter back under the other. Verified: a "W" + unit context selected on a folio, two conductors wired, W1 and W2 in the saved file, and the context survives reload. Depends on the preceding ConductorCreator fix for the database to agree with the drawing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>