mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-22 06:14:14 +02:00
%T last: a folio title keeps the variables it contains
The folio title was put into the formula before %c, %l, %prefix, the wire variables, the title block and project variables and the sequences, so a title such as "Schema %c" had them replaced inside it. It is replaced after all of them now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,8 @@
|
||||
%T in a folio report or cross reference formula is the title of the
|
||||
folio the reference points to, so a reference can read like the ones
|
||||
EPLAN prints: "+UV1/1 Versorgung UG/EG.0". %total and the title block
|
||||
and project variables (lower case only) keep their own values.
|
||||
and project variables (lower case only) keep their own values, and the
|
||||
title itself is free text: variables in it stay as typed.
|
||||
*/
|
||||
class tst_reportfoliotitle : public QObject
|
||||
{
|
||||
@@ -62,6 +63,15 @@ private slots:
|
||||
QCOMPARE(result, QStringLiteral("Versorgung UG/EG / 23 / SH363N / SH363N"));
|
||||
}
|
||||
|
||||
void titleKeepsTheVariablesItContains()
|
||||
{
|
||||
autonum::FormulaContext c = context();
|
||||
c.folio_title = QStringLiteral("Schema %c %F %total %{typ}");
|
||||
c.title_block_fields.addValue(QStringLiteral("typ"), QStringLiteral("SH363N"));
|
||||
const QString result = label(QStringLiteral("%F %T"), c);
|
||||
QCOMPARE(result, QStringLiteral("1 Schema %c %F %total %{typ}"));
|
||||
}
|
||||
|
||||
void emptyTitleLeavesNothing()
|
||||
{
|
||||
autonum::FormulaContext c = context();
|
||||
|
||||
Reference in New Issue
Block a user