mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-21 16:37:12 +01:00
All things with an UpdatePrefs() message listen for an event...
... Still to do, improve the handling of updates of only subsets of the prefs
This commit is contained in:
@@ -146,6 +146,14 @@ ViewInfo::ViewInfo(double start, double screenDuration, double pixelsPerSecond)
|
||||
UpdatePrefs();
|
||||
}
|
||||
|
||||
void ViewInfo::UpdateSelectedPrefs( int id )
|
||||
{
|
||||
if (id == UpdateScrollPrefsID())
|
||||
gPrefs->Read(wxT("/GUI/AutoScroll"), &bUpdateTrackIndicator,
|
||||
true);
|
||||
ZoomInfo::UpdateSelectedPrefs( id );
|
||||
}
|
||||
|
||||
void ViewInfo::UpdatePrefs()
|
||||
{
|
||||
ZoomInfo::UpdatePrefs();
|
||||
@@ -155,6 +163,8 @@ void ViewInfo::UpdatePrefs()
|
||||
#endif
|
||||
gPrefs->Read(wxT("/GUI/AdjustSelectionEdges"), &bAdjustSelectionEdges,
|
||||
true);
|
||||
|
||||
UpdateSelectedPrefs( UpdateScrollPrefsID() );
|
||||
}
|
||||
|
||||
void ViewInfo::SetBeforeScreenWidth(wxInt64 beforeWidth, wxInt64 screenWidth, double lowerBoundTime)
|
||||
@@ -206,3 +216,9 @@ void ViewInfo::OnTimer(wxCommandEvent &event)
|
||||
// Propagate the message to other listeners bound to this
|
||||
this->ProcessEvent( event );
|
||||
}
|
||||
|
||||
int ViewInfo::UpdateScrollPrefsID()
|
||||
{
|
||||
static int value = wxNewId();
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user