parampanel: close contexts belonging to closing project
This commit is contained in:
@@ -53,6 +53,11 @@ public:
|
||||
GetParamView()->SetIgnoreNodeFlags(e);
|
||||
}
|
||||
|
||||
void CloseContextsBelongingToProject(Project *p)
|
||||
{
|
||||
GetParamView()->CloseContextsBelongingToProject(p);
|
||||
}
|
||||
|
||||
public slots:
|
||||
void SelectNodes(const QVector<Node*>& nodes);
|
||||
void DeselectNodes(const QVector<Node*>& nodes);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -55,6 +55,8 @@ public:
|
||||
return input_checked_.value(input);
|
||||
}
|
||||
|
||||
void CloseContextsBelongingToProject(Project *p);
|
||||
|
||||
Node* GetTimeTarget() const;
|
||||
|
||||
void DeleteSelected();
|
||||
|
||||
@@ -371,6 +371,9 @@ void MainWindow::ProjectClose(Project *p)
|
||||
|
||||
// Close project from NodeView
|
||||
node_panel_->CloseContextsBelongingToProject(p);
|
||||
|
||||
// Close project from NodeParamView
|
||||
param_panel_->CloseContextsBelongingToProject(p);
|
||||
}
|
||||
|
||||
void MainWindow::SetApplicationProgressStatus(ProgressStatus status)
|
||||
|
||||
Reference in New Issue
Block a user