mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-03 10:34:14 +02:00
Merge pull request #572 from ispyisail/fix-titleblock-empty-var-override
Fix #531: page-level empty title block variable no longer shadows project-level value
This commit is contained in:
@@ -898,9 +898,13 @@ void BorderTitleBlock::updateDiagramContextForTitleBlock(
|
|||||||
const DiagramContext &initial_context) {
|
const DiagramContext &initial_context) {
|
||||||
// Our final DiagramContext is the initial one (which is supposed to bring
|
// Our final DiagramContext is the initial one (which is supposed to bring
|
||||||
// project-wide properties), overridden by the "additional fields" one...
|
// project-wide properties), overridden by the "additional fields" one...
|
||||||
|
// An empty page-level value means the variable was auto-added to the
|
||||||
|
// folio's Custom tab (#495) but never actually set by the user, so it
|
||||||
|
// must not shadow a real project-level value of the same name (#531).
|
||||||
DiagramContext context = initial_context;
|
DiagramContext context = initial_context;
|
||||||
foreach (QString key, additional_fields_.keys()) {
|
foreach (QString key, additional_fields_.keys()) {
|
||||||
context.addValue(key, additional_fields_[key]);
|
if (!additional_fields_[key].toString().isEmpty())
|
||||||
|
context.addValue(key, additional_fields_[key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ... overridden by the historical and/or dynamically generated fields
|
// ... overridden by the historical and/or dynamically generated fields
|
||||||
|
|||||||
Reference in New Issue
Block a user