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

More updating of ProjectWindow and TrackPanel into event handlers...

... reducing intrusions in much other code
This commit is contained in:
Paul Licameli 2019-07-02 08:51:36 -04:00
commit 5741589758
15 changed files with 22 additions and 137 deletions

View File

@ -146,10 +146,6 @@ You are saving directly to a slow external storage device\n\
else
// Add to history
history.PushState(_("Recorded Audio"), _("Record"));
// Refresh the project window
window.FixScrollbars();
window.RedrawProject();
}
// Write all cached files to disk, if any

View File

@ -463,7 +463,6 @@ void ProjectManager::OnCloseWindow(wxCloseEvent & event)
wxCommandEvent dummyEvent;
ControlToolBar::Get( project ).OnStop(dummyEvent);
window.FixScrollbars();
projectAudioIO.SetAudioIOToken(0);
window.RedrawProject();
}

View File

@ -641,6 +641,8 @@ ProjectWindow::ProjectWindow(wxWindow * parent, wxWindowID id,
mPlaybackScroller = std::make_unique<PlaybackScroller>( &project );
project.Bind( EVT_UNDO_MODIFIED, &ProjectWindow::OnUndoPushedModified, this );
project.Bind( EVT_UNDO_PUSHED, &ProjectWindow::OnUndoPushedModified, this );
project.Bind( EVT_UNDO_OR_REDO, &ProjectWindow::OnUndoRedo, this );
project.Bind( EVT_UNDO_RESET, &ProjectWindow::OnUndoReset, this );
}
@ -865,12 +867,16 @@ void ProjectWindow::ApplyUpdatedTheme()
void ProjectWindow::RedrawProject(const bool bForceWaveTracks /*= false*/)
{
CallAfter( [this, bForceWaveTracks]{
auto pThis = wxWeakRef<ProjectWindow>(this);
CallAfter( [pThis, bForceWaveTracks]{
auto &project = mProject ;
if (!pThis)
return;
auto &project = pThis->mProject ;
auto &tracks = TrackList::Get( project );
auto &trackPanel = TrackPanel::Get( project );
FixScrollbars();
pThis->FixScrollbars();
if (bForceWaveTracks)
{
for ( auto pWaveTrack : tracks.Any< WaveTrack >() )
@ -1435,18 +1441,24 @@ void ProjectWindow::OnToolBarUpdate(wxCommandEvent & event)
event.Skip(false); /* No need to propagate any further */
}
void ProjectWindow::OnUndoPushedModified( wxCommandEvent &evt )
{
evt.Skip();
RedrawProject();
}
void ProjectWindow::OnUndoRedo( wxCommandEvent &evt )
{
evt.Skip();
HandleResize();
CallAfter( [this]{ RedrawProject(); } );
RedrawProject();
}
void ProjectWindow::OnUndoReset( wxCommandEvent &evt )
{
evt.Skip();
HandleResize();
// CallAfter( [this]{ RedrawProject(); } ); // Should we do this here too?
// RedrawProject(); // Should we do this here too?
}
void ProjectWindow::OnScroll(wxScrollEvent & WXUNUSED(event))
@ -1608,7 +1620,6 @@ void ProjectWindow::ZoomAfterImport(Track *pTrack)
DoZoomFit();
trackPanel.SetFocus();
RedrawProject();
if (!pTrack)
pTrack = *tracks.Selected().begin();
if (!pTrack)

View File

@ -155,6 +155,7 @@ public:
void DoScroll();
void OnScroll(wxScrollEvent & event);
void OnToolBarUpdate(wxCommandEvent & event);
void OnUndoPushedModified( wxCommandEvent & );
void OnUndoRedo( wxCommandEvent & );
void OnUndoReset( wxCommandEvent & );

View File

@ -30,7 +30,6 @@ void DoSelectTimeAndAudioTracks
(AudacityProject &project, bool bAllTime, bool bAllTracks)
{
auto &tracks = TrackList::Get( project );
auto &trackPanel = TrackPanel::Get( project );
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
if( bAllTime )
@ -45,7 +44,6 @@ void DoSelectTimeAndAudioTracks
t->SetSelected(true);
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
}
}
@ -56,7 +54,6 @@ void DoSelectTimeAndTracks
(AudacityProject &project, bool bAllTime, bool bAllTracks)
{
auto &tracks = TrackList::Get( project );
auto &trackPanel = TrackPanel::Get( project );
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
if( bAllTime )
@ -68,7 +65,6 @@ void DoSelectTimeAndTracks
t->SetSelected(true);
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
}
}

View File

@ -428,7 +428,6 @@ void TrackPanel::OnTimer(wxTimerEvent& )
if (projectAudioIO.GetAudioIOToken()>0 &&
!gAudioIO->IsAudioTokenActive(projectAudioIO.GetAudioIOToken()))
{
window.FixScrollbars();
projectAudioIO.SetAudioIOToken(0);
window.RedrawProject();
@ -724,7 +723,6 @@ void TrackPanel::UpdateViewIfNoTracks()
// Bug 972
mViewInfo->h = 0;
mListener->TP_RedrawScrollbars();
mListener->TP_HandleResize();
GetProject()->SetStatus(wxT("")); //STM: Clear message if all tracks are removed
}

View File

@ -56,7 +56,6 @@ void DoRemoveTracks( AudacityProject &project )
.PushState(_("Removed audio track(s)"), _("Remove Track"));
trackPanel.UpdateViewIfNoTracks();
trackPanel.Refresh(false);
}
void DoTrackMute(AudacityProject &project, Track *t, bool exclusive)
@ -106,7 +105,6 @@ void DoTrackMute(AudacityProject &project, Track *t, bool exclusive)
ProjectHistory::Get( project ).ModifyState(true);
trackPanel.UpdateAccessibility();
trackPanel.Refresh(false);
}
void DoTrackSolo(AudacityProject &project, Track *t, bool exclusive)
@ -159,7 +157,6 @@ void DoTrackSolo(AudacityProject &project, Track *t, bool exclusive)
ProjectHistory::Get( project ).ModifyState(true);
trackPanel.UpdateAccessibility();
trackPanel.Refresh(false);
}
void DoRemoveTrack(AudacityProject &project, Track * toRemove)
@ -196,9 +193,6 @@ void DoRemoveTrack(AudacityProject &project, Track * toRemove)
wxString::Format(_("Removed track '%s.'"),
name),
_("Track Remove"));
window.HandleResize();
trackPanel.Refresh(false);
}
void DoMoveTrack
@ -251,7 +245,6 @@ void DoMoveTrack
longDesc = longDesc.Format(target->GetName());
ProjectHistory::Get( project ).PushState(longDesc, shortDesc);
trackPanel.Refresh(false);
}
}

View File

@ -207,7 +207,10 @@ void EffectManager::UnregisterEffect(const PluginID & ID)
window.DoZoomFit();
// trackPanel->Refresh(false);
}
// PRL: RedrawProject explicitly because sometimes history push is skipped
window.RedrawProject();
if (focus != nullptr && focus->GetParent()==parent) {
focus->SetFocus();
}

View File

@ -391,7 +391,6 @@ void DoSelectClipBoundary(AudacityProject &project, bool next)
selectedRegion.setT0(results[0].time);
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
wxString message = ClipBoundaryMessage(results);
trackPanel.MessageForScreenReader(message);
@ -575,7 +574,6 @@ void DoSelectClip(AudacityProject &project, bool next)
selectedRegion.setTimes(t0, t1);
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.ScrollIntoView(selectedRegion.t0());
trackPanel.Refresh(false);
// create and send message to screen reader
wxString message;
@ -621,7 +619,6 @@ void DoCursorClipBoundary
selectedRegion.setTimes(time, time);
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.ScrollIntoView(selectedRegion.t0());
trackPanel.Refresh(false);
wxString message = ClipBoundaryMessage(results);
trackPanel.MessageForScreenReader(message);
@ -711,7 +708,6 @@ void DoClipLeftOrRight
tracks, isSyncLocked, right );
trackPanel.ScrollIntoView(selectedRegion.t0());
trackPanel.Refresh(false);
if (amount != 0.0) {
wxString message = right? _("Time shifted clips to the right") :

View File

@ -64,8 +64,6 @@ bool DoPasteText(AudacityProject &project)
trackPanel.ScrollIntoView(x);
}
// Redraw everyting (is that necessary???) and bail
window.RedrawProject();
return true;
}
}
@ -157,8 +155,6 @@ bool DoPasteNothingSelected(AudacityProject &project)
ProjectHistory::Get( project )
.PushState(_("Pasted from the clipboard"), _("Paste"));
window.RedrawProject();
if (pFirstNewTrack)
pFirstNewTrack->EnsureVisible();
@ -315,8 +311,6 @@ void OnCut(const CommandContext &context)
// Bug 1663
//mRuler->ClearPlayRegion();
ruler.DrawOverlays( true );
window.RedrawProject();
}
void OnDelete(const CommandContext &context)
@ -340,8 +334,6 @@ void OnDelete(const CommandContext &context)
seconds,
selectedRegion.t0()),
_("Delete"));
window.RedrawProject();
}
@ -639,8 +631,6 @@ void OnPaste(const CommandContext &context)
ProjectHistory::Get( project )
.PushState(_("Pasted from the clipboard"), _("Paste"));
window.RedrawProject();
if (ff)
ff->EnsureVisible();
}
@ -670,8 +660,6 @@ void OnDuplicate(const CommandContext &context)
}
ProjectHistory::Get( project ).PushState(_("Duplicated"), _("Duplicate"));
window.RedrawProject();
}
void OnSplitCut(const CommandContext &context)
@ -712,8 +700,6 @@ void OnSplitCut(const CommandContext &context)
selectedRegion.t0(), selectedRegion.t1(), &project );
ProjectHistory::Get( project ).PushState(_("Split-cut to the clipboard"), _("Split Cut"));
window.RedrawProject();
}
void OnSplitDelete(const CommandContext &context)
@ -739,8 +725,6 @@ void OnSplitDelete(const CommandContext &context)
selectedRegion.duration(),
selectedRegion.t0()),
_("Split Delete"));
window.RedrawProject();
}
void OnSilence(const CommandContext &context)
@ -758,8 +742,6 @@ void OnSilence(const CommandContext &context)
selectedRegion.duration(),
selectedRegion.t0()),
_("Silence"));
trackPanel.Refresh(false);
}
void OnTrim(const CommandContext &context)
@ -785,8 +767,6 @@ void OnTrim(const CommandContext &context)
_("Trim selected audio tracks from %.2f seconds to %.2f seconds"),
selectedRegion.t0(), selectedRegion.t1()),
_("Trim Audio"));
window.RedrawProject();
}
void OnSplit(const CommandContext &context)
@ -803,7 +783,6 @@ void OnSplit(const CommandContext &context)
wt->Split( sel0, sel1 );
ProjectHistory::Get( project ).PushState(_("Split"), _("Split"));
trackPanel.Refresh(false);
#if 0
//ANSWER-ME: Do we need to keep this commented out OnSplit() code?
// This whole section no longer used...
@ -848,9 +827,6 @@ void OnSplit(const CommandContext &context)
}
PushState(_("Split"), _("Split"));
FixScrollbars();
trackPanel.Refresh(false);
*/
#endif
}
@ -904,8 +880,6 @@ void OnSplitNew(const CommandContext &context)
ProjectHistory::Get( project )
.PushState(_("Split to new track"), _("Split New"));
window.RedrawProject();
}
void OnJoin(const CommandContext &context)
@ -924,8 +898,6 @@ void OnJoin(const CommandContext &context)
selectedRegion.duration(),
selectedRegion.t0()),
_("Join"));
window.RedrawProject();
}
void OnDisjoin(const CommandContext &context)
@ -944,8 +916,6 @@ void OnDisjoin(const CommandContext &context)
selectedRegion.duration(),
selectedRegion.t0()),
_("Detach"));
window.RedrawProject();
}
void OnEditMetadata(const CommandContext &context)

View File

@ -76,7 +76,6 @@ int DoAddLabel(
ProjectHistory::Get( project ).PushState(_("Added label"), _("Label"));
window.RedrawProject();
if (!useDialog) {
lt->EnsureVisible();
}
@ -343,9 +342,6 @@ void OnPasteNewLabel(const CommandContext &context)
if (bPastedSomething) {
ProjectHistory::Get( project ).PushState(
_("Pasted from the clipboard"), _("Paste Text to New Label"));
// Is this necessary? (carried over from former logic in OnPaste())
window.RedrawProject();
}
}
@ -387,8 +383,6 @@ void OnCutLabels(const CommandContext &context)
_( "Cut labeled audio regions to clipboard" ),
/* i18n-hint: (verb)*/
_( "Cut Labeled Audio" ) );
window.RedrawProject();
}
void OnDeleteLabels(const CommandContext &context)
@ -410,8 +404,6 @@ void OnDeleteLabels(const CommandContext &context)
_( "Deleted labeled audio regions" ),
/* i18n-hint: (verb)*/
_( "Delete Labeled Audio" ) );
window.RedrawProject();
}
void OnSplitCutLabels(const CommandContext &context)
@ -433,8 +425,6 @@ void OnSplitCutLabels(const CommandContext &context)
_( "Split Cut labeled audio regions to clipboard" ),
/* i18n-hint: (verb) Do a special kind of cut on the labels*/
_( "Split Cut Labeled Audio" ) );
window.RedrawProject();
}
void OnSplitDeleteLabels(const CommandContext &context)
@ -456,8 +446,6 @@ void OnSplitDeleteLabels(const CommandContext &context)
/* i18n-hint: (verb) Do a special kind of DELETE on labeled audio
regions */
_( "Split Delete Labeled Audio" ) );
window.RedrawProject();
}
void OnSilenceLabels(const CommandContext &context)
@ -477,8 +465,6 @@ void OnSilenceLabels(const CommandContext &context)
_( "Silenced labeled audio regions" ),
/* i18n-hint: (verb)*/
_( "Silence Labeled Audio" ) );
trackPanel.Refresh( false );
}
void OnCopyLabels(const CommandContext &context)
@ -497,8 +483,6 @@ void OnCopyLabels(const CommandContext &context)
ProjectHistory::Get( project ).PushState( _( "Copied labeled audio regions to clipboard" ),
/* i18n-hint: (verb)*/
_( "Copy Labeled Audio" ) );
trackPanel.Refresh( false );
}
void OnSplitLabels(const CommandContext &context)
@ -516,8 +500,6 @@ void OnSplitLabels(const CommandContext &context)
_( "Split labeled audio (points or regions)" ),
/* i18n-hint: (verb)*/
_( "Split Labeled Audio" ) );
window.RedrawProject();
}
void OnJoinLabels(const CommandContext &context)
@ -538,8 +520,6 @@ void OnJoinLabels(const CommandContext &context)
_( "Joined labeled audio (points or regions)" ),
/* i18n-hint: (verb) */
_( "Join Labeled Audio" ) );
window.RedrawProject();
}
void OnDisjoinLabels(const CommandContext &context)
@ -561,8 +541,6 @@ void OnDisjoinLabels(const CommandContext &context)
_( "Detached labeled audio regions" ),
/* i18n-hint: (verb)*/
_( "Detach Labeled Audio" ) );
window.RedrawProject();
}
}; // struct Handler

View File

@ -28,7 +28,6 @@ void DoNextPeakFrequency(AudacityProject &project, bool up)
{
auto &tracks = TrackList::Get( project );
auto &viewInfo = ViewInfo::Get( project );
auto &trackPanel = TrackPanel::Get( project );
// Find the first selected wave track that is in a spectrogram view.
const WaveTrack *pTrack {};
@ -43,7 +42,6 @@ void DoNextPeakFrequency(AudacityProject &project, bool up)
if (pTrack) {
SpectrumAnalyst analyst;
SelectHandle::SnapCenterOnce(analyst, viewInfo, pTrack, up);
trackPanel.Refresh(false);
ProjectHistory::Get( project ).ModifyState(false);
}
}
@ -413,7 +411,6 @@ void DoBoundaryMove(AudacityProject &project, int step, SeekInfo &info)
viewInfo.selectedRegion.setT1(indicator);
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
return;
}
@ -482,7 +479,6 @@ void OnSelectSyncLockSel(const CommandContext &context)
{
auto &project = context.project;
auto &tracks = TrackList::Get( project );
auto &trackPanel = TrackPanel::Get( project );
bool selected = false;
for (auto t : tracks.Any()
@ -493,8 +489,6 @@ void OnSelectSyncLockSel(const CommandContext &context)
if (selected)
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
}
//this pops up a dialog which allows the left selection to be set.
@ -506,7 +500,6 @@ void OnSetLeftSelection(const CommandContext &context)
auto token = ProjectAudioIO::Get( project ).GetAudioIOToken();
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
const auto &settings = ProjectSettings::Get( project );
auto &trackPanel = TrackPanel::Get( project );
auto &window = GetProjectFrame( project );
bool bSelChanged = false;
@ -537,7 +530,6 @@ void OnSetLeftSelection(const CommandContext &context)
if (bSelChanged)
{
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
}
}
@ -547,7 +539,6 @@ void OnSetRightSelection(const CommandContext &context)
auto token = ProjectAudioIO::Get( project ).GetAudioIOToken();
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
const auto &settings = ProjectSettings::Get( project );
auto &trackPanel = TrackPanel::Get( project );
auto &window = GetProjectFrame( project );
bool bSelChanged = false;
@ -578,7 +569,6 @@ void OnSetRightSelection(const CommandContext &context)
if (bSelChanged)
{
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
}
}
@ -586,7 +576,6 @@ void OnSelectStartCursor(const CommandContext &context)
{
auto &project = context.project;
auto &tracks = TrackList::Get( project );
auto &trackPanel = TrackPanel::Get( project );
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
double kWayOverToRight = std::numeric_limits<double>::max();
@ -604,15 +593,12 @@ void OnSelectStartCursor(const CommandContext &context)
selectedRegion.setT0(minOffset);
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
}
void OnSelectCursorEnd(const CommandContext &context)
{
auto &project = context.project;
auto &tracks = TrackList::Get( project );
auto &trackPanel = TrackPanel::Get( project );
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
double kWayOverToLeft = std::numeric_limits<double>::lowest();
@ -630,8 +616,6 @@ void OnSelectCursorEnd(const CommandContext &context)
selectedRegion.setT1(maxEndOffset);
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
}
void OnSelectTrackStartToEnd(const CommandContext &context)
@ -639,7 +623,6 @@ void OnSelectTrackStartToEnd(const CommandContext &context)
auto &project = context.project;
auto &viewInfo = ViewInfo::Get( project );
auto &tracks = TrackList::Get( project );
auto &trackPanel = TrackPanel::Get( project );
auto range = tracks.Selected();
double maxEndOffset = range.max( &Track::GetEndTime );
@ -650,8 +633,6 @@ void OnSelectTrackStartToEnd(const CommandContext &context)
viewInfo.selectedRegion.setTimes( minOffset, maxEndOffset );
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
}
// Handler state:
@ -669,7 +650,6 @@ void OnSelectionRestore(const CommandContext &context)
{
auto &project = context.project;
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
auto &trackPanel = TrackPanel::Get( project );
if ((mRegionSave.t0() == 0.0) &&
(mRegionSave.t1() == 0.0))
@ -678,8 +658,6 @@ void OnSelectionRestore(const CommandContext &context)
selectedRegion = mRegionSave;
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
}
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
@ -691,7 +669,6 @@ double mLastF1{ SelectedRegion::UndefinedFrequency };
void OnToggleSpectralSelection(const CommandContext &context)
{
auto &project = context.project;
auto &trackPanel = TrackPanel::Get( project );
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
const double f0 = selectedRegion.f0();
@ -709,7 +686,6 @@ void OnToggleSpectralSelection(const CommandContext &context)
else
selectedRegion.setFrequencies(mLastF0, mLastF1);
trackPanel.Refresh(false);
ProjectHistory::Get( project ).ModifyState(false);
}
@ -733,7 +709,6 @@ double mCursorPositionStored{ 0.0 };
void OnSelectCursorStoredCursor(const CommandContext &context)
{
auto &project = context.project;
auto &trackPanel = TrackPanel::Get( project );
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
auto isAudioActive = ProjectAudioIO::Get( project ).IsAudioActive();
@ -747,7 +722,6 @@ void OnSelectCursorStoredCursor(const CommandContext &context)
std::max(cursorPositionCurrent, mCursorPositionStored));
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
}
}
@ -768,7 +742,6 @@ void OnZeroCrossing(const CommandContext &context)
auto &project = context.project;
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
const auto &settings = ProjectSettings::Get( project );
auto &trackPanel = TrackPanel::Get( project );
const double t0 = NearestZeroCrossing(project, selectedRegion.t0());
if (selectedRegion.isPoint())
@ -781,8 +754,6 @@ void OnZeroCrossing(const CommandContext &context)
}
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.Refresh(false);
}
void OnSnapToOff(const CommandContext &context)
@ -869,7 +840,6 @@ void OnCursorSelStart(const CommandContext &context)
selectedRegion.collapseToT0();
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.ScrollIntoView(selectedRegion.t0());
trackPanel.Refresh(false);
}
void OnCursorSelEnd(const CommandContext &context)
@ -881,7 +851,6 @@ void OnCursorSelEnd(const CommandContext &context)
selectedRegion.collapseToT1();
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.ScrollIntoView(selectedRegion.t1());
trackPanel.Refresh(false);
}
void OnCursorTrackStart(const CommandContext &context)
@ -908,7 +877,6 @@ void OnCursorTrackStart(const CommandContext &context)
selectedRegion.setTimes(minOffset, minOffset);
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.ScrollIntoView(selectedRegion.t0());
trackPanel.Refresh(false);
}
void OnCursorTrackEnd(const CommandContext &context)
@ -935,7 +903,6 @@ void OnCursorTrackEnd(const CommandContext &context)
selectedRegion.setTimes(maxEndOffset, maxEndOffset);
ProjectHistory::Get( project ).ModifyState(false);
trackPanel.ScrollIntoView(selectedRegion.t1());
trackPanel.Refresh(false);
}
void OnSkipStart(const CommandContext &context)

View File

@ -115,7 +115,6 @@ void DoMixAndRender
trackPanel.SetFocus();
trackPanel.SetFocusedTrack(pNewLeft);
pNewLeft->EnsureVisible();
window.RedrawProject();
}
}
@ -133,8 +132,6 @@ void DoPanTracks(AudacityProject &project, float PanValue)
for (auto left : count == 0 ? range : selectedRange )
left->SetPan( PanValue );
window.RedrawProject();
auto flags = UndoPush::AUTOSAVE;
/*i18n-hint: One or more audio tracks have been panned*/
ProjectHistory::Get( project )
@ -299,8 +296,6 @@ void DoAlign
selectedRegion.move(delta);
ProjectHistory::Get( project ).PushState(action, shortAction);
window.RedrawProject();
}
#ifdef EXPERIMENTAL_SCOREALIGN
@ -590,7 +585,6 @@ void OnNewWaveTrack(const CommandContext &context)
ProjectHistory::Get( project )
.PushState(_("Created new audio track"), _("New Track"));
window.RedrawProject();
t->EnsureVisible();
}
@ -618,7 +612,6 @@ void OnNewStereoTrack(const CommandContext &context)
ProjectHistory::Get( project )
.PushState(_("Created new stereo audio track"), _("New Track"));
window.RedrawProject();
left->EnsureVisible();
}
@ -638,7 +631,6 @@ void OnNewLabelTrack(const CommandContext &context)
ProjectHistory::Get( project )
.PushState(_("Created new label track"), _("New Track"));
window.RedrawProject();
t->EnsureVisible();
}
@ -663,7 +655,6 @@ void OnNewTimeTrack(const CommandContext &context)
ProjectHistory::Get( project )
.PushState(_("Created new time track"), _("New Track"));
window.RedrawProject();
t->EnsureVisible();
}
@ -789,8 +780,7 @@ void OnResample(const CommandContext &context)
}
undoManager.StopConsolidating();
window.RedrawProject();
// Need to reset
window.FinishAutoScroll();
}
@ -818,7 +808,6 @@ void OnMuteAllTracks(const CommandContext &context)
}
ProjectHistory::Get( project ).ModifyState(true);
window.RedrawProject();
}
void OnUnmuteAllTracks(const CommandContext &context)
@ -839,7 +828,6 @@ void OnUnmuteAllTracks(const CommandContext &context)
}
ProjectHistory::Get( project ).ModifyState(true);
window.RedrawProject();
}
void OnPanLeft(const CommandContext &context)
@ -997,7 +985,6 @@ void OnScoreAlign(const CommandContext &context)
if (result == SA_SUCCESS) {
tracks->Replace(nt, holder);
project.RedrawProject();
AudacityMessageBox(wxString::Format(
_("Alignment completed: MIDI from %.2f to %.2f secs, Audio from %.2f to %.2f secs."),
params.mMidiStart, params.mMidiEnd,
@ -1027,9 +1014,6 @@ void OnSortTime(const CommandContext &context)
ProjectHistory::Get( project )
.PushState(_("Tracks sorted by time"), _("Sort by Time"));
auto &trackPanel = TrackPanel::Get( project );
trackPanel.Refresh(false);
}
void OnSortName(const CommandContext &context)
@ -1039,9 +1023,6 @@ void OnSortName(const CommandContext &context)
ProjectHistory::Get( project )
.PushState(_("Tracks sorted by name"), _("Sort by Name"));
auto &trackPanel = TrackPanel::Get( project );
trackPanel.Refresh(false);
}
void OnSyncLock(const CommandContext &context)

View File

@ -258,7 +258,6 @@ void OnZoomFitV(const CommandContext &context)
DoZoomFitV(project);
window.GetVerticalScrollBar().SetThumbPosition(0);
window.RedrawProject();
ProjectHistory::Get( project ).ModifyState(true);
}
@ -284,7 +283,6 @@ void OnCollapseAllTracks(const CommandContext &context)
TrackView::Get( *t ).SetMinimized(true);
ProjectHistory::Get( project ).ModifyState(true);
window.RedrawProject();
}
void OnExpandAllTracks(const CommandContext &context)
@ -297,7 +295,6 @@ void OnExpandAllTracks(const CommandContext &context)
TrackView::Get( *t ).SetMinimized(false);
ProjectHistory::Get( project ).ModifyState(true);
window.RedrawProject();
}
void OnGoSelStart(const CommandContext &context)

View File

@ -2051,7 +2051,6 @@ void LabelTrackView::DoEditLabels
if (dlg.ShowModal() == wxID_OK) {
ProjectHistory::Get( project )
.PushState(_("Edited labels"), _("Label"));
window.RedrawProject();
}
}