mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-13 10:04:13 +02:00
Save the default cross-reference properties to QSettings
NewDiagramPage::applyConf() writes every other default to QSettings — border, title block, conductors, folio reports and the guides — but the cross-reference branch only fetched the properties into a local hash and then dropped it on the floor. hash_xrp was never used. The result: changing the cross-reference defaults under Settings > New project has no effect. Nothing is written, no defaultxref* key ever appears in the configuration file, and XRefProperties::defaultProperties() keeps handing out the hardcoded fallbacks for every new project. Write each of the four types (coil, protection, commutator, plc) with the "diagrameditor/defaultxref" + key prefix that defaultProperties() already reads back.
This commit is contained in:
@@ -214,7 +214,11 @@ void NewDiagramPage::applyConf()
|
||||
rpw->toSettings(settings, "diagrameditor/defaultreport");
|
||||
|
||||
// default xref properties
|
||||
QHash <QString, XRefProperties> hash_xrp = xrefpw -> properties();
|
||||
const QHash<QString, XRefProperties> hash_xrp = xrefpw->properties();
|
||||
for (auto it = hash_xrp.constBegin() ; it != hash_xrp.constEnd() ; ++it) {
|
||||
it.value().toSettings(settings,
|
||||
QStringLiteral("diagrameditor/defaultxref") % it.key());
|
||||
}
|
||||
|
||||
// Global in QSettings speichern
|
||||
QList<Diagram::Guide> current_guides = m_gpw->guides();
|
||||
|
||||
Reference in New Issue
Block a user