mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-15 01:54:14 +02:00
Build the folios before reading the drawn items' view (stage D6)
A query of drawing_item_view, which is made of the shape, text and picture tables, built no folio, and with folios built only when needed (the default since D6) it found nothing: the drawn items are written to the database by built folios. A query naming the view builds them, as one naming the tables does. Found by the qet MCP server's suite (four drawn-item tests failed lazily, passed with every folio built). tst_lazyfolios: the view's rows from a .qetz as when built (5 = 5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1660,10 +1660,11 @@ QSqlQuery projectDataBase::newQuery(const QString &query, QString *error) {
|
||||
//storeConductorProperties().
|
||||
//The drawing tables hold what only built items know (a text's
|
||||
//laid-out size, a picture's pixels): with folios not built yet
|
||||
//(lazy folios) a read of them builds those first. Every other
|
||||
//table was filled from the document.
|
||||
//(lazy folios) a read of them builds those first, and so does a
|
||||
//read of the view made of them. Every other table was filled from
|
||||
//the document.
|
||||
static const QRegularExpression drawing_tables(
|
||||
QStringLiteral("\\b(shape|independent_text|image)\\b"),
|
||||
QStringLiteral("\\b(shape|independent_text|image|drawing_item_view)\\b"),
|
||||
QRegularExpression::CaseInsensitiveOption);
|
||||
if (m_project && m_project->unloadedFolioCount() && drawing_tables.match(query).hasMatch()) {
|
||||
m_project->loadFolios();
|
||||
|
||||
Reference in New Issue
Block a user