Files
qelectrotech-source-mirror/sources/autoNum
Beat Hangartner fc39acaf75 Replace %sequ_10 before %sequ_1 in label formulas
AssignVariables::assignSequence() replaced the sequential-number
placeholders from 1 upwards with a plain QString::replace(). "%sequ_1"
is also the start of "%sequ_10", so with ten or more sequences a
formula's %sequ_10 became the first value followed by a "0". The same
held for every family (%sequf_, %seqt_, %seqtf_, %seqh_, %seqhf_,
%seqw_, %seqa_).

Run the loop from the highest number down to 1, so the longer
placeholder is gone before the shorter one is looked for.

No file-format change. Labels with fewer than ten sequences come out
exactly as before.

Tests: tst_tensequentialnumbers runs the binary's --export-bom on a
fixture whose element has the formula %sequ_10-%sequ_1 and the unit
values A to J, and expects the label "J-A". On master the label is
"A0-A".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Beat Hangartner <beat@hangartners.ch>
2026-10-07 23:38:34 +02:00
..
2026-10-03 18:09:33 +02:00