1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-14 17:14:07 +01:00

Bug2265: Should save and restore track heights...

... Regression happened at 3f1fd8ced0

The heights were written to file, but not read back again.

This fix was done carefully to avoid making dependency cycles.  We don't want
Track to depend on TrackView or TrackControls.

It's not great that LabelTrack, NoteTrack, TimeTrack, and WaveTrack now have
those dependencies, but at least they don't make cycles.

It would be better to figure out how to attach the view and controls to the
track with ClientData, then just invoke BuildAll to repopulate the view and
controls, so that they are non-null when you reach
Track::HandleCommonXMLAttribute.
This commit is contained in:
Paul Licameli
2020-01-14 19:58:38 -05:00
parent bd95b910bb
commit cbe4a46af2
5 changed files with 30 additions and 5 deletions

View File

@@ -93,7 +93,7 @@ void TrackView::WriteXMLAttributes( XMLWriter &xmlFile ) const
bool TrackView::HandleXMLAttribute( const wxChar *attr, const wxChar *value )
{
wxString strValue;
wxString strValue( value );
long nValue;
if (!wxStrcmp(attr, wxT("height")) &&
XMLValueChecker::IsGoodInt(strValue) && strValue.ToLong(&nValue)) {