Completed cmdNew implementation.
This commit is contained in:
		| @@ -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 ); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user