mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-25 23:54:22 +01:00
Merge pull request #1386 from bhangart/fix/sequential-placeholder-order
Replace %sequ_10 before %sequ_1 in label formulas
This commit is contained in:
@@ -482,7 +482,10 @@ namespace autonum
|
||||
m_seq_struct.wrap.size()))
|
||||
);
|
||||
|
||||
for (int i=1; i<=max ; i++)
|
||||
// Highest number first: "%sequ_1" is also the start of
|
||||
// "%sequ_10", so replacing 1 before 10 would turn %sequ_10
|
||||
// into the first value followed by a "0".
|
||||
for (int i=max; i>=1 ; i--)
|
||||
{
|
||||
if (m_assigned_label.contains("%sequ_" + QString::number(i)) && m_seq_struct.unit.size() >= i) {
|
||||
m_assigned_label.replace("%sequ_" + QString::number(i),m_seq_struct.unit.at(i-1));
|
||||
|
||||
Reference in New Issue
Block a user