fixed clip adding

This commit is contained in:
itsmattkc
2019-04-03 02:05:15 +11:00
parent 2d4714547b
commit 365d96f83e
7 changed files with 35 additions and 8 deletions
+3 -2
View File
@@ -14,7 +14,8 @@ Track::Track(TrackList* parent, Type type) :
type_(type),
muted_(false),
soloed_(false),
locked_(false)
locked_(false),
height_(olive::timeline::kTrackDefaultHeight)
{
}
@@ -79,7 +80,7 @@ void Track::AddClip(ClipPtr clip)
}
clips_.append(clip);
if (clip->track() != nullptr) {
if (clip->track() != nullptr && clip->track() != this) {
clip->track()->RemoveClip(clip.get());
}
clip->set_track(this);