mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
New Element Wizard : tree view only display directory
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4484 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#include "qetmessagebox.h"
|
||||
#include "elementscategoryeditor.h"
|
||||
#include "newelementwizard.h"
|
||||
#include "elementscategory.h"
|
||||
#include "xmlprojectelementcollectionitem.h"
|
||||
#include "qetproject.h"
|
||||
#include "qetelementeditor.h"
|
||||
@@ -368,16 +367,18 @@ void ElementsCollectionWidget::newElement()
|
||||
{
|
||||
ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu);
|
||||
|
||||
if (eci->type() != FileElementCollectionItem::Type) return;
|
||||
if (eci->type() != FileElementCollectionItem::Type) {
|
||||
return;
|
||||
}
|
||||
|
||||
FileElementCollectionItem *feci = static_cast<FileElementCollectionItem*>(eci);
|
||||
if(feci->isCommonCollection()) return;
|
||||
|
||||
ElementsCollectionItem *category = QETApp::collectionItem(ElementsLocation(feci->collectionPath()), false);
|
||||
ElementsCategory *selected_category = category -> toCategory();
|
||||
if (!selected_category) return;
|
||||
if(feci->isCommonCollection()) {
|
||||
return;
|
||||
}
|
||||
|
||||
NewElementWizard elmt_wizard(this);
|
||||
ElementsLocation loc(feci->collectionPath());
|
||||
elmt_wizard.preselectedLocation(loc);
|
||||
elmt_wizard.exec();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user