Element panel widget : Add item to the QTreeView when create a new element or a new directory

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4556 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-06-17 09:09:46 +00:00
parent 18f56b6540
commit 32c6d00bce
3 changed files with 19 additions and 5 deletions

View File

@@ -367,9 +367,8 @@ void ElementsCollectionWidget::newDirectory()
ElementsLocation location(feci->collectionPath());
ElementsCategoryEditor new_dir_editor(location, false, this);
if (new_dir_editor.exec() == QDialog::Accepted) {
reload();
}
if (new_dir_editor.exec() == QDialog::Accepted)
m_model->addLocation(new_dir_editor.createdLocation());
}
/**
@@ -393,6 +392,9 @@ void ElementsCollectionWidget::newElement()
ElementsLocation loc(feci->collectionPath());
elmt_wizard.preselectedLocation(loc);
elmt_wizard.exec();
foreach (QETElementEditor *element_editor, QETApp::instance()->elementEditors())
connect(element_editor, &QETElementEditor::saveToLocation, this, &ElementsCollectionWidget::locationWasSaved);
}
/**