This commit is contained in:
Christoph Holzheuer
2025-09-01 17:40:08 +02:00
parent 4d49a495fd
commit 527de65074
6 changed files with 72 additions and 39 deletions

View File

@@ -60,17 +60,9 @@ XQItem* XQMainModel::addProjectItem( XQNodePtr contentNode )
// den neuen eintrag in die passende section der übersicht eintragen ...
section.headerItem().appendRow( newItem );
// ... ausklappen...
const QModelIndex index = section.headerItem().index();
_treeTable->expand( index );
// ... und markieren
_treeTable->setCurrentIndex( index );
// quellknoten auch speichern
//newItem->setContentNode( contentNode );
//emit itemCreated( newItem );
// erzeuger sheet node speichern
newItem->setSheetNode( sheetNode );
expandNewItem(section.headerItem().index() );
return newItem;
}
}
@@ -80,24 +72,8 @@ XQItem* XQMainModel::addProjectItem( XQNodePtr contentNode )
void XQMainModel::addSectionItem( const XQModelSection& section, XQItem* projectItem )
{
qDebug() << " --- SUPPA0: " << section.contentType();
if( projectItem->hasContentNode())
qDebug() << " --- SUPPA1: -> " << projectItem->contentNode()->to_string();
qDebug() << " --- SUPPA2: -> " << projectItem->sheetNode()->to_string();
qDebug() << " --- SUPPA3: -> " << projectItem->sheetNode()->find_child_by_tag_name("CurrentSection")->to_string();
XQNodePtr sheetNode = projectItem->sheetNode()->find_child_by_tag_name("CurrentSection");
XQItem* newItem = _itemFactory.makeSingleItem( sheetNode, section.contentType() );
projectItem->appendRow( newItem );
//qDebug() << " --- SUPPA4: -> " << section.contentRootNode()->to_string();
/*
XQNodePtr sheetNode = projectItem->sheetNode()->find_child_by_tag_name("CurrentSection");
XQItemList list = _itemFactory.makeRow( XQItemFactory::mSingle, sheetNode, nullptr, c_ContentType );
projectItem->appendRow( list );
_treeTable->expand( projectItem->index() );
*/
expandNewItem(projectItem->index() );
}