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:
ispyisail
2026-10-20 00:09:06 +13:00
parent 672ba7c409
commit 04ad1c890a
3 changed files with 20 additions and 7 deletions
+3 -2
View File
@@ -2697,8 +2697,9 @@ bool projectDataBase::createDataBase()
//The numbering tables (QETZ-DB-FIRST stage 2b): the project's
//schemes, one row per part of each in its order, and the settings
//saved with them. Not filled from the folios: QETProject writes
//them when it reads its file and whenever its numbering changes.
//saved with them; the save writes the numbering from them. Not
//filled from the folios: QETProject writes them when it reads its
//file and whenever its numbering changes.
for (const char *table : {
"CREATE TABLE numbering_scheme ("
"kind VARCHAR(20) NOT NULL, title TEXT NOT NULL, uuid VARCHAR(50), "