use nodes as context rather than void

This commit is contained in:
itsmattkc
2021-05-27 13:32:32 +10:00
parent 0c5c9f0794
commit f876240443
9 changed files with 57 additions and 55 deletions
+4 -2
View File
@@ -719,7 +719,7 @@ void MainWindow::UpdateNodePanelContextFromTimelinePanel(TimelinePanel *panel)
{
// Add selected blocks (if any)
const QVector<Block*> &blocks = panel->GetSelectedBlocks();
QVector<void *> context(blocks.size());
QVector<Node *> context(blocks.size());
for (int i=0; i<blocks.size(); i++) {
context[i] = blocks.at(i);
}
@@ -748,7 +748,9 @@ void MainWindow::FocusedPanelChanged(PanelWidget *panel)
} else if (ProjectPanel* project = dynamic_cast<ProjectPanel*>(panel)) {
// Signal project panel focus
UpdateTitle();
node_panel_->SetGraph(project->project(), {project->project()});
if (project->project()) {
node_panel_->SetGraph(project->project(), {project->project()->root()});
}
}
}