mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
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:
@@ -85,6 +85,15 @@ ElementsCategoryEditor::ElementsCategoryEditor(const ElementsLocation &location,
|
||||
ElementsCategoryEditor::~ElementsCategoryEditor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementsCategoryEditor::createdLocation
|
||||
* @return the location of the created directory
|
||||
*/
|
||||
ElementsLocation ElementsCategoryEditor::createdLocation() const
|
||||
{
|
||||
return m_created_location;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementsCategoryEditor::setUpWidget
|
||||
*/
|
||||
@@ -150,8 +159,8 @@ void ElementsCategoryEditor::acceptCreation()
|
||||
|
||||
ElementCollectionHandler ech_;
|
||||
NamesList nl = m_names_list->names();
|
||||
ElementsLocation loc = ech_.createDir(m_location, dirname, nl);
|
||||
if (loc.isNull()) {
|
||||
m_created_location = ech_.createDir(m_location, dirname, nl);
|
||||
if (m_created_location.isNull()) {
|
||||
QET::QetMessageBox::critical(this,
|
||||
tr("Erreur", "message box title"),
|
||||
tr("Impossible de créer la catégorie", "message box content"));
|
||||
|
||||
Reference in New Issue
Block a user