parampanel: close contexts belonging to closing project

This commit is contained in:
itsmattkc
2022-01-02 18:43:27 -08:00
parent 2afa7ecafe
commit 4f9ac4b36d
4 changed files with 24 additions and 0 deletions
@@ -163,6 +163,20 @@ NodeParamView::~NodeParamView()
qDeleteAll(context_items_);
}
void NodeParamView::CloseContextsBelongingToProject(Project *p)
{
QVector<Node*> new_contexts = contexts_;
for (int i=0; i<new_contexts.size(); i++) {
if (new_contexts.at(i)->project() == p) {
new_contexts.removeAt(i);
i--;
}
}
SetContexts(new_contexts);
}
/*void NodeParamView::SelectNodes(const QVector<Node *> &nodes)
{
return;
+2
View File
@@ -55,6 +55,8 @@ public:
return input_checked_.value(input);
}
void CloseContextsBelongingToProject(Project *p);
Node* GetTimeTarget() const;
void DeleteSelected();