mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-05 18:54:14 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user