mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-28 04:54:13 +02:00
e19d60ae55
The summary line exists so that an empty wiring list is distinguishable from one where every conductor was excluded, and it was reporting the wrong number to do it. QSqlQueryModel fetches lazily, so rowCount() straight after setQuery() returns the rows fetched so far -- 256 -- not the size of the query. Measured with Qt's own QSQLITE driver: a 1000-row view reports 256 until the model is drained, then 1000. The test project quoted in slice 2 has 280 conductors, so this was already displaying 256 on our own data, plausibly enough that nobody looked twice. Drain the model before reading the count. Also refresh the database before building the model. The dialog queries the database rather than the diagrams, so anything not yet written through was invisible here; with conductor text now updated on change that gap is smaller, but a project loaded before this dialog was ever opened still relies on the repopulate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>