better attachment between labels and tracks

This commit is contained in:
itsmattkc
2019-04-04 19:35:52 +11:00
parent e708791e90
commit d7091c2b10
9 changed files with 53 additions and 27 deletions
+1
View File
@@ -71,6 +71,7 @@ int Track::height()
void Track::set_height(int h)
{
height_ = qMax(h, olive::timeline::kTrackMinHeight);
emit HeightChanged(h);
}
QString Track::name()
+3
View File
@@ -98,6 +98,9 @@ public slots:
void SetSoloed(bool soloed);
void SetLocked(bool locked);
signals:
void HeightChanged(int height);
private:
void ResizeClipArray(int new_size);
+9
View File
@@ -37,6 +37,8 @@ void TrackList::AddTrack()
{
Track* track = new Track(this, type_);
tracks_.append(track);
emit TrackCountChanged();
}
void TrackList::RemoveTrack(int i)
@@ -45,6 +47,8 @@ void TrackList::RemoveTrack(int i)
return;
}
tracks_.removeAt(i);
emit TrackCountChanged();
}
Track *TrackList::First()
@@ -52,6 +56,11 @@ Track *TrackList::First()
return tracks_.first();
}
Track *TrackList::Last()
{
return tracks_.last();
}
int TrackList::TrackCount()
{
return tracks_.size();
+4
View File
@@ -15,6 +15,7 @@ public:
void AddTrack();
void RemoveTrack(int i);
Track* First();
Track* Last();
int TrackCount();
int IndexOfTrack(Track* track);
Track* TrackAt(int i);
@@ -24,6 +25,9 @@ public:
Sequence* GetParent();
signals:
void TrackCountChanged();
private:
void ResizeTrackArray(int i);