nodes: link edges to IDs rather than objects
Allows code to know whether the connected parameters has been removed or not.
This commit is contained in:
@@ -134,7 +134,7 @@ TrackOutput* TrackList::AddTrack()
|
||||
return track;
|
||||
}
|
||||
|
||||
void TrackList::RemoveTrack()
|
||||
void TrackList::RemoveTrack(QObject* new_parent)
|
||||
{
|
||||
if (track_cache_.isEmpty()) {
|
||||
return;
|
||||
@@ -144,7 +144,11 @@ void TrackList::RemoveTrack()
|
||||
|
||||
GetParentGraph()->TakeNode(track);
|
||||
|
||||
delete track;
|
||||
if (!new_parent) {
|
||||
delete track;
|
||||
} else {
|
||||
track->setParent(new_parent);
|
||||
}
|
||||
|
||||
track_input_->RemoveLast();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user