1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-02 17:09:26 +02:00

Bug 2422 - Append Recording always scrolls vertically to bottom track

Fix:
Move the scrolling to ProjectAudioManager::DoRecord(), where it's known whether the recording is appending to existing tracks or not.
This commit is contained in:
David Bailes 2020-07-07 16:25:12 +01:00
parent fff9e6a2e4
commit 25c1a0b280
3 changed files with 6 additions and 23 deletions

View File

@ -733,6 +733,8 @@ bool ProjectAudioManager::DoRecord(AudacityProject &project,
TrackList::Get( *p ).GroupChannels(*first, recordingChannels); TrackList::Get( *p ).GroupChannels(*first, recordingChannels);
// Bug 1548. First of new tracks needs the focus. // Bug 1548. First of new tracks needs the focus.
TrackFocus::Get(*p).Set(first); TrackFocus::Get(*p).Set(first);
if (TrackList::Get(*p).back())
TrackList::Get(*p).back()->EnsureVisible();
} }
//Automated Input Level Adjustment Initialization //Automated Input Level Adjustment Initialization

View File

@ -280,8 +280,6 @@ TrackPanel::TrackPanel(wxWindow * parent, wxWindowID id,
*this, std::move( pAx ) ); *this, std::move( pAx ) );
} }
mRedrawAfterStop = false;
mTrackArtist = std::make_unique<TrackArtist>( this ); mTrackArtist = std::make_unique<TrackArtist>( this );
mTimeCount = 0; mTimeCount = 0;
@ -418,8 +416,6 @@ void TrackPanel::OnTimer(wxTimerEvent& )
{ {
projectAudioIO.SetAudioIOToken(0); projectAudioIO.SetAudioIOToken(0);
window.RedrawProject(); window.RedrawProject();
mRedrawAfterStop = false;
} }
if (mLastDrawnSelectedRegion != mViewInfo->selectedRegion) { if (mLastDrawnSelectedRegion != mViewInfo->selectedRegion) {
UpdateSelectionDisplay(); UpdateSelectionDisplay();
@ -438,20 +434,12 @@ void TrackPanel::OnTimer(wxTimerEvent& )
// Periodically update the display while recording // Periodically update the display while recording
if (!mRedrawAfterStop) { if ((mTimeCount % 5) == 0) {
mRedrawAfterStop = true; // Must tell OnPaint() to recreate the backing bitmap
MakeParentRedrawScrollbars(); // since we've not done a full refresh.
mListener->TP_ScrollUpDown( 99999999 ); mRefreshBacking = true;
Refresh( false ); Refresh( false );
} }
else {
if ((mTimeCount % 5) == 0) {
// Must tell OnPaint() to recreate the backing bitmap
// since we've not done a full refresh.
mRefreshBacking = true;
Refresh( false );
}
}
} }
if(mTimeCount > 1000) if(mTimeCount > 1000)
mTimeCount = 0; mTimeCount = 0;

View File

@ -202,13 +202,6 @@ protected:
bool mRefreshBacking; bool mRefreshBacking;
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
protected:
#endif
bool mRedrawAfterStop;
protected: protected: