nodeview: only select if a graph is currently active
Fixes segfault where timeline attempted to signal NodeView to select nodes after it had already cleared itself.
This commit is contained in:
@@ -114,6 +114,10 @@ void NodeView::DeselectAll()
|
||||
|
||||
void NodeView::Select(const QList<Node *> &nodes)
|
||||
{
|
||||
if (!graph_) {
|
||||
return;
|
||||
}
|
||||
|
||||
DeselectAll();
|
||||
|
||||
foreach (Node* n, nodes) {
|
||||
@@ -125,6 +129,10 @@ void NodeView::Select(const QList<Node *> &nodes)
|
||||
|
||||
void NodeView::SelectWithDependencies(QList<Node *> nodes)
|
||||
{
|
||||
if (!graph_) {
|
||||
return;
|
||||
}
|
||||
|
||||
int original_length = nodes.size();
|
||||
for (int i=0;i<original_length;i++) {
|
||||
nodes.append(nodes.at(i)->GetDependencies());
|
||||
|
||||
Reference in New Issue
Block a user