Merge pull request #1240 from ispyisail/fix/project-properties-ok-marks-modified

Fix Project properties > OK marking the project modified with no edit
This commit is contained in:
Laurent Trinques
2026-10-02 12:54:46 +02:00
committed by GitHub
7 changed files with 49 additions and 4 deletions
@@ -168,6 +168,7 @@ void TitleBlockPropertiesWidget::setProperties(
// Show the saved custom values, plus any of the template's custom variables
// that aren't defined yet, so the user only fills in the missing ones (#271).
DiagramContext context = properties.context;
m_context_keys = context.keys();
addTemplateVariables(context, index);
m_dcw -> setContext(context);
}
@@ -217,6 +218,14 @@ TitleBlockProperties TitleBlockPropertiesWidget::properties() const
}
prop.context = m_dcw -> context();
//The template's custom variables are only offered for filling in
//(#271): one left empty is not part of the properties.
const QList<QString> keys = prop.context.keys();
for (const QString &key : keys) {
if (!m_context_keys.contains(key)
&& prop.context.value(key).toString().isEmpty())
prop.context.remove(key);
}
//The combo box cannot show "no folio numbering": it shows its
//placeholder entry, or the project's first numbering. Return what