ensure nodeview is unset when project closes
This commit is contained in:
@@ -35,6 +35,11 @@ class NodePanel : public PanelWidget
|
||||
public:
|
||||
NodePanel(QWidget* parent);
|
||||
|
||||
NodeGraph* GetGraph() const
|
||||
{
|
||||
return node_view_->GetGraph();
|
||||
}
|
||||
|
||||
void SetGraph(NodeGraph *graph)
|
||||
{
|
||||
node_view_->SetGraph(graph);
|
||||
|
||||
@@ -46,6 +46,11 @@ public:
|
||||
|
||||
virtual ~NodeView() override;
|
||||
|
||||
NodeGraph* GetGraph() const
|
||||
{
|
||||
return graph_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Sets the graph to view
|
||||
*/
|
||||
|
||||
@@ -362,6 +362,11 @@ void MainWindow::ProjectClose(Project *p)
|
||||
RemoveProjectPanel(panel);
|
||||
}
|
||||
}
|
||||
|
||||
// Close project from NodeView
|
||||
if (node_panel_->GetGraph() == p) {
|
||||
node_panel_->SetGraph(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::SetApplicationProgressStatus(ProgressStatus status)
|
||||
|
||||
Reference in New Issue
Block a user