diff --git a/src/application/xqmainmodel.cpp b/src/application/xqmainmodel.cpp index 168934d..5043430 100644 --- a/src/application/xqmainmodel.cpp +++ b/src/application/xqmainmodel.cpp @@ -86,10 +86,13 @@ XQItem* XQMainModel::addProjectItem( XQNodePtr contentNode ) void XQMainModel::addSectionItem( const XQModelSection& section, XQItem* projectItem ) { -/* + return; + qDebug() << " --- addSecxtion: " << projectItem->sheetNode()->to_string(); + return; + 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() ); -*/ + } diff --git a/src/application/xqmainwindow.cpp b/src/application/xqmainwindow.cpp index 409bc21..4ce91a9 100644 --- a/src/application/xqmainwindow.cpp +++ b/src/application/xqmainwindow.cpp @@ -117,7 +117,7 @@ void XQMainWindow::initMainWindow() // #2. load demo data loadDocument( c_DocumentFileName1 ); - loadDocumentQML( c_DocumentFileName2 ); + //loadDocumentQML( c_DocumentFileName2 ); qDebug() << " --- all here: " << XQNode::s_Count; diff --git a/src/model/xqsimpleclipboard.cpp b/src/model/xqsimpleclipboard.cpp index d89d4e8..39f62e1 100644 --- a/src/model/xqsimpleclipboard.cpp +++ b/src/model/xqsimpleclipboard.cpp @@ -48,6 +48,7 @@ void XQSimpleClipBoard::saveNodes( const QModelIndexList& list ) for( auto entry : list ) { XQNodePtr contentNode = XQItem::xqItemFromIndex( entry ).contentNode(); + qDebug() << " --- Cloned: " << contentNode->friendly_name(); // im clipboard brauchen wir eine eltern-lose kopie des knotens push_back( {entry.row(), contentNode->own_pos(), contentNode->clone() } ); } diff --git a/src/model/xqviewmodel.cpp b/src/model/xqviewmodel.cpp index 6f07c7f..683da7a 100644 --- a/src/model/xqviewmodel.cpp +++ b/src/model/xqviewmodel.cpp @@ -383,12 +383,10 @@ void XQViewModel::cmdPaste( XQCommand& command ) // wir pasten das clipboard for (auto& entry : _clipBoard ) { - - // WARUM zwei mal klonen ? - - // noch ein clone vom clone erzeugen ... + // noch einen clone vom clone im clipboard erzeugen ... XQNodePtr newNode = entry.contentNode->clone(section.contentRootNode() ); - newNode->clone(section.contentRootNode() )->add_me_at( nodePos ); + // ... diesen einfügen ... + newNode->add_me_at( nodePos ); // ... und damit eine frische item-row erzeugen XQItemList list = _itemFactory.makeRow( XQItemFactory::mData, section.sheetRootNode(), newNode ); insertRow( insRow, list );