refurbished old style item creation.
This commit is contained in:
@@ -108,7 +108,8 @@ void XQViewModel::initModel(const QString& modelName)
|
||||
const XQNodePtr header = sectionNode->find_child_by_tag_name( c_Header );
|
||||
if( header )
|
||||
{
|
||||
XQItemList list = _itemFactory.makeHeaderRow( header );
|
||||
|
||||
XQItemList list = _itemFactory.makeRow( header, nullptr );
|
||||
addSection(list, sectionNode );
|
||||
}
|
||||
|
||||
@@ -353,7 +354,7 @@ void XQViewModel::cmdCutUndo( XQCommand& command )
|
||||
const XQNodePtr& savedNode = entry.contentNode;
|
||||
// __fix! should not be _contentRoot!
|
||||
savedNode->add_me_at( entry.nodePos, _contentRoot );
|
||||
XQItemList list = _itemFactory.makeContentRow( section.sheetRootNode(), savedNode );
|
||||
XQItemList list = _itemFactory.makeRow( section.sheetRootNode(), savedNode );
|
||||
|
||||
XQItem& firstItem = *((XQItem*)list[0]);
|
||||
qDebug() << " --- Cut Undo: " << firstItem.text() << " " << firstItem.row() << " id#" << entry.contentNode->_id << " count: " << entry.contentNode.use_count();
|
||||
@@ -388,7 +389,7 @@ void XQViewModel::cmdPaste( XQCommand& command )
|
||||
XQNodePtr newNode = entry.contentNode->clone(section.contentRootNode() );
|
||||
newNode->clone(section.contentRootNode() )->add_me_at( nodePos );
|
||||
// ... und damit eine frische item-row erzeugen
|
||||
XQItemList list = _itemFactory.makeContentRow( section.sheetRootNode(), newNode );
|
||||
XQItemList list = _itemFactory.makeRow( section.sheetRootNode(), newNode );
|
||||
insertRow( insRow, list );
|
||||
// die neue item-row selektieren
|
||||
const QModelIndex& selIdx = list[0]->index();
|
||||
|
Reference in New Issue
Block a user