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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user