mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-24 08:28:04 +02:00
Simplify logic of track control panel click to rearrange...
... Rearrange drag is now simply the default of all other hit tests. The comment, as to the purpose of the removed call to TrackSelFunc, is obsolete, because clicks on hidden buttons and sliders have recently been disabled. The mention of "the area left of the minimize button" is obsolete because there is no such area any more after 2.2.0 layout changes. Just before this commit, click in the minimize button but near the left edge did not minimize, but started a track rearrange drag! That should not be so.
This commit is contained in:
parent
ca62891dde
commit
63c89e1fe3
@ -5333,12 +5333,6 @@ void TrackPanel::HandleLabelClick(wxMouseEvent & event)
|
||||
if (isleft && PopupFunc(t, rect, event.m_x, event.m_y))
|
||||
return;
|
||||
|
||||
// VJ: Check sync-lock icon and the blank area to the left of the minimize button.
|
||||
// Have to do it here, because if track is shrunk such that these areas occlude controls,
|
||||
// e.g., mute/solo, don't want the "Funcs" below to set up handling.
|
||||
// Only result of doing so is to select the track. Don't care whether isleft.
|
||||
bool bTrackSelClick = this->TrackSelFunc(t, rect, event.m_x, event.m_y);
|
||||
if (!bTrackSelClick)
|
||||
{
|
||||
// MM: Check minimize buttons on WaveTracks. Must be before
|
||||
// solo/mute buttons, sliders etc.
|
||||
@ -5583,23 +5577,6 @@ bool TrackPanel::MuteSoloFunc(Track * t, wxRect rect, int x, int y,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TrackPanel::TrackSelFunc(Track * WXUNUSED(t), wxRect rect, int x, int y)
|
||||
{
|
||||
// First check the blank space to left of minimize button.
|
||||
wxRect selRect;
|
||||
mTrackInfo.GetMinimizeRect(rect, selRect); // for y and height
|
||||
selRect.x = rect.x;
|
||||
selRect.width = 16; // (kTrackInfoBtnSize)
|
||||
selRect.height++;
|
||||
if (selRect.Contains(x, y))
|
||||
return true;
|
||||
|
||||
// Try the sync-lock rect.
|
||||
mTrackInfo.GetSyncLockIconRect(rect, selRect);
|
||||
selRect.height++;
|
||||
return selRect.Contains(x, y);
|
||||
}
|
||||
|
||||
bool TrackPanel::MinimizeFunc(Track * t, wxRect rect, int x, int y)
|
||||
{
|
||||
wxRect buttonRect;
|
||||
|
@ -482,11 +482,6 @@ protected:
|
||||
virtual bool CloseFunc(Track * t, wxRect rect, int x, int y);
|
||||
virtual bool PopupFunc(Track * t, wxRect rect, int x, int y);
|
||||
|
||||
// TrackSelFunc, unlike the other *Func methods, returns true if the click is not
|
||||
// set up to be handled, but click is on the sync-lock icon or the blank area to
|
||||
// the left of the minimize button, and we want to pass it forward to be a track select.
|
||||
virtual bool TrackSelFunc(Track * t, wxRect rect, int x, int y);
|
||||
|
||||
virtual bool MuteSoloFunc(Track *t, wxRect rect, int x, int f, bool solo);
|
||||
virtual bool MinimizeFunc(Track *t, wxRect rect, int x, int f);
|
||||
virtual bool GainFunc(Track * t, wxRect rect, wxMouseEvent &event,
|
||||
|
Loading…
x
Reference in New Issue
Block a user