1
0
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:
Paul Licameli
2018-02-17 17:42:14 -05:00
parent cc635e0498
commit 62899a32f4
37 changed files with 198 additions and 136 deletions

View File

@@ -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;
}