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:
itsmattkc
2020-10-02 16:04:50 +10:00
parent 2fb7066155
commit 4204910796
16 changed files with 112 additions and 38 deletions
+6 -2
View File
@@ -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();
}