fixed selection crashes.

This commit is contained in:
2025-09-06 16:06:47 +02:00
parent 89c671295f
commit 0fe15d6043
5 changed files with 39 additions and 28 deletions

View File

@@ -127,12 +127,6 @@ const XQModelSection& XQSectionManager::sectionByKey( const QString& sectionKey
const XQModelSection& XQSectionManager::sectionByRow(int itemRow ) const
{
/*
for( const XQModelSection& section : _sections )
{
qDebug() << " --- sectionByRow: " <<section.startIndex().data().toString() << ": " << lastRow(section);
}
*/
// wir gehen rückwärts, weil wir da nur einen vergleich brauchen
// und uns den test mit lastRow() sparen können.
@@ -151,7 +145,7 @@ const XQModelSection& XQSectionManager::sectionByRow(int itemRow ) const
const XQModelSection& XQSectionManager::createSection(const QModelIndex& modelIndex, XQNodePtr sheetNode)
{
const QString& sectionKey = sheetNode->attribute(c_ContentType);
qDebug() << " --- create Section: " << sectionKey << ": " << modelIndex.data().toString();
//qDebug() << " --- create Section: " << sectionKey << ": " << modelIndex.data().toString();
XQModelSection section(modelIndex, sheetNode );
_sections.addAtKey( sectionKey, section);
return sectionByKey(sectionKey);