mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 23:29:41 +02:00
Hiding the affordance on the right channel of the WaveTrack
(cherry picked from audacity commit f1638da631e9965f1e1c0922dca2e565c51fefd6) Signed-off-by: akleja <storspov@gmail.com>
This commit is contained in:
parent
62fe78b0ef
commit
cc49ceec3d
@ -1313,3 +1313,13 @@ Track::LinkType Track::GetLinkType() const noexcept
|
||||
{
|
||||
return mLinkType;
|
||||
}
|
||||
|
||||
bool Track::IsAlignedWithLeader() const
|
||||
{
|
||||
if (auto owner = GetOwner())
|
||||
{
|
||||
auto leader = *owner->FindLeader(this);
|
||||
return leader != this && leader->GetLinkType() == Track::LinkType::Aligned;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -376,6 +376,9 @@ public:
|
||||
std::shared_ptr<TrackList> GetOwner() const { return mList.lock(); }
|
||||
|
||||
LinkType GetLinkType() const noexcept;
|
||||
//! Returns true if the leader track has link type LinkType::Aligned
|
||||
bool IsAlignedWithLeader() const;
|
||||
|
||||
protected:
|
||||
|
||||
void SetLinkType(LinkType linkType);
|
||||
|
@ -1087,7 +1087,12 @@ WaveTrackView::GetAllSubViews()
|
||||
|
||||
std::shared_ptr<CommonTrackCell> WaveTrackView::GetAffordanceControls()
|
||||
{
|
||||
return DoGetAffordance(FindTrack());
|
||||
auto track = FindTrack();
|
||||
if (!track->IsAlignedWithLeader())
|
||||
{
|
||||
return DoGetAffordance(track);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
void WaveTrackView::DoSetMinimized( bool minimized )
|
||||
|
Loading…
x
Reference in New Issue
Block a user