Completed cmdNew implementation.

This commit is contained in:
2025-09-04 14:56:18 +02:00
parent f8bd0886d3
commit 89c5fd21f1
5 changed files with 45 additions and 42 deletions

View File

@@ -404,7 +404,6 @@ void XQMainWindow::loadDocument( const QString& fileName )
connect( childModel, SIGNAL(sectionCreated(XQModelSection)), this, SLOT(onSectionCreated(XQModelSection)) );
connect( childModel, SIGNAL(sectionToggled(XQModelSection)), this, SLOT(onSectionToggled(XQModelSection)) );
//connect( childModel, &QStandardItemModel::itemChanged, this, &XQMainWindow::onTreeItemChanged);
// Den globalen undo-stack ...
childModel->setUndoStack(&_undoStack);
@@ -432,7 +431,9 @@ void XQMainWindow::saveDocument( const QString& fileName )
{
XQNodeWriter nodeWriter;
int curIdx = _tabWidget->currentIndex();
XQNodePtr rootNode = _documentStore[curIdx].treeItem->contentNode();
//XQNodePtr rootNode = _documentStore[curIdx].treeItem->contentNode();
XQNodePtr rootNode = _documentStore[curIdx].modelView->contentRootNode();
Q_ASSERT(rootNode);
nodeWriter.dumpTree( rootNode, fileName );
}