mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-22 14:24:13 +02:00
Write the project's numbering from the project database
QETZ-DB-FIRST stage 2b-2. The save writes the numbering schemes and their settings from the project database's numbering rows (2b-1) instead of the project's own lists. The project still keeps the rows in step after each change, and QET_CHECK_NUMBERING_ROWS still says whether the two agree, until the lists go (2b-3). tst_elementautonumids::numberingRowsFollowEveryChange also checks the saved file: the current symbol and wire numbering and the schemes. With setCurrrentElementAutonum() not writing the rows, a save straight after it now names the old scheme in use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4247,10 +4247,13 @@ void QETProject::writeDefaultPropertiesXml(QDomElement &xml_element)
|
||||
}
|
||||
xml_element.appendChild(xrefs_elmt);
|
||||
|
||||
writeNumberingXml(numberingOfProject(), xml_element);
|
||||
//The numbering is written from the project database's rows
|
||||
//(QETZ-DB-FIRST stage 2b-2), which the project keeps in step
|
||||
//(writeNumberingRows())
|
||||
writeNumberingXml(m_data_base.numbering(), xml_element);
|
||||
//QET_CHECK_NUMBERING_ROWS=1: say whether the project database's
|
||||
//numbering rows write what the project writes (QETZ-DB-FIRST stage
|
||||
//2b-1). A test and debugging aid; it changes nothing.
|
||||
//numbering rows write what the project holds. A test and
|
||||
//debugging aid; it changes nothing.
|
||||
if (qEnvironmentVariableIntValue("QET_CHECK_NUMBERING_ROWS") == 1) {
|
||||
QDomDocument from_project, from_rows;
|
||||
QDomElement project_root = from_project.createElement(QStringLiteral("numbering"));
|
||||
@@ -4308,8 +4311,9 @@ projectDataBase::Numbering QETProject::numberingOfProject() const
|
||||
@brief QETProject::writeNumberingRows
|
||||
Write the project's numbering into the project database's numbering
|
||||
tables (QETZ-DB-FIRST stage 2b-1): after reading the file and after
|
||||
each change of the numbering, so the rows are always what the save
|
||||
writes (QET_CHECK_NUMBERING_ROWS checks it)
|
||||
each change of the numbering. The save writes the numbering from
|
||||
them (2b-2); QET_CHECK_NUMBERING_ROWS says whether they hold what
|
||||
the project does
|
||||
*/
|
||||
void QETProject::writeNumberingRows()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user