nodeparamview: remove item when nodes is removed from context

This commit is contained in:
itsmattkc
2022-04-09 15:36:49 -07:00
parent 48adb159b8
commit 1448f641e5
6 changed files with 41 additions and 7 deletions
@@ -51,8 +51,16 @@ void NodeParamViewContext::AddNode(NodeParamViewItem *item)
dock_area_->AddItem(item);
}
void NodeParamViewContext::RemoveNode(Node *node)
void NodeParamViewContext::RemoveNode(Node *node, Node *ctx)
{
for (auto it=items_.begin(); it!=items_.end(); ) {
if (it.value()->GetContext() == ctx) {
delete it.value();
it = items_.erase(it);
} else {
it++;
}
}
}
void NodeParamViewContext::Clear()