mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
The elements panel now checks that embedded collections exist before expanding them.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1498 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -395,7 +395,18 @@ QTreeWidgetItem *ElementsPanel::addProject(QETProject *project) {
|
||||
qtwi_project
|
||||
);
|
||||
qtwi_project -> setExpanded(true);
|
||||
itemForTemplatesCollection(project -> embeddedTitleBlockTemplatesCollection()) -> setExpanded(true);
|
||||
|
||||
if (TitleBlockTemplatesCollection *tbt_collection = project -> embeddedTitleBlockTemplatesCollection()) {
|
||||
if (QTreeWidgetItem *tbt_collection_qtwi = itemForTemplatesCollection(tbt_collection)) {
|
||||
tbt_collection_qtwi -> setExpanded(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (ElementsCollection *elmt_collection = project -> embeddedCollection()) {
|
||||
if (QTreeWidgetItem *elmt_collection_qtwi = itemForElementsCollection(elmt_collection)) {
|
||||
elmt_collection_qtwi -> setExpanded(true);
|
||||
}
|
||||
}
|
||||
|
||||
return(qtwi_project);
|
||||
}
|
||||
@@ -679,6 +690,7 @@ void ElementsPanel::filter(const QString &m, QET::Filtering filtering) {
|
||||
void ElementsPanel::projectWasOpened(QETProject *project) {
|
||||
projects_to_display_ << project;
|
||||
addProject(project);
|
||||
emit(panelContentChanged());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -690,6 +702,7 @@ void ElementsPanel::projectWasClosed(QETProject *project) {
|
||||
GenericPanel::deleteItem(item_to_remove);
|
||||
projects_to_display_.remove(project);
|
||||
}
|
||||
emit(panelContentChanged());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user