mirror of
https://github.com/cookiengineer/audacity
synced 2026-04-01 20:14:49 +02:00
TrackPanel listens for Undo events, doesn't intrude in ProjectHistory
This commit is contained in:
@@ -78,6 +78,8 @@ is time to refresh some aspect of the screen.
|
||||
#include "TrackPanelResizeHandle.h"
|
||||
//#define DEBUG_DRAW_TIMING 1
|
||||
|
||||
#include "UndoManager.h"
|
||||
|
||||
#include "AColor.h"
|
||||
#include "AllThemeResources.h"
|
||||
#include "AudioIO.h"
|
||||
@@ -320,6 +322,8 @@ TrackPanel::TrackPanel(wxWindow * parent, wxWindowID id,
|
||||
theProject->Bind(
|
||||
EVT_PROJECT_SETTINGS_CHANGE, &TrackPanel::OnProjectSettingsChange, this);
|
||||
|
||||
theProject->Bind(EVT_UNDO_RESET, &TrackPanel::OnUndoReset, this);
|
||||
|
||||
UpdatePrefs();
|
||||
}
|
||||
|
||||
@@ -554,6 +558,13 @@ double TrackPanel::GetScreenEndTime() const
|
||||
return mViewInfo->PositionToTime(width, 0, true);
|
||||
}
|
||||
|
||||
void TrackPanel::OnUndoReset( wxCommandEvent &event )
|
||||
{
|
||||
event.Skip();
|
||||
SetFocusedTrack( nullptr );
|
||||
Refresh( false );
|
||||
}
|
||||
|
||||
/// AS: OnPaint( ) is called during the normal course of
|
||||
/// completing a repaint operation.
|
||||
void TrackPanel::OnPaint(wxPaintEvent & /* event */)
|
||||
|
||||
Reference in New Issue
Block a user