mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Bug2303: Play after project open should start at saved cursor
This commit is contained in:
parent
c886851edc
commit
5a2eaf9a52
@ -34,6 +34,17 @@ wxEvent *SelectedRegionEvent::Clone() const
|
||||
return safenew SelectedRegionEvent{ *this };
|
||||
}
|
||||
|
||||
bool NotifyingSelectedRegion::HandleXMLAttribute
|
||||
(const wxChar *attr, const wxChar *value,
|
||||
const wxChar *legacyT0Name, const wxChar *legacyT1Name)
|
||||
{
|
||||
auto result = mRegion.HandleXMLAttribute(
|
||||
attr, value, legacyT0Name, legacyT1Name );
|
||||
if ( result )
|
||||
Notify( true );
|
||||
return result;
|
||||
}
|
||||
|
||||
NotifyingSelectedRegion& NotifyingSelectedRegion::operator =
|
||||
( const SelectedRegion &other )
|
||||
{
|
||||
@ -128,9 +139,12 @@ bool NotifyingSelectedRegion::setF1(double f, bool maySwap)
|
||||
return result;
|
||||
}
|
||||
|
||||
void NotifyingSelectedRegion::Notify()
|
||||
void NotifyingSelectedRegion::Notify( bool delayed )
|
||||
{
|
||||
SelectedRegionEvent evt{ EVT_SELECTED_REGION_CHANGE, this };
|
||||
if ( delayed )
|
||||
QueueEvent( evt.Clone() );
|
||||
else
|
||||
ProcessEvent( evt );
|
||||
}
|
||||
|
||||
|
@ -59,9 +59,7 @@ public:
|
||||
|
||||
bool HandleXMLAttribute
|
||||
(const wxChar *attr, const wxChar *value,
|
||||
const wxChar *legacyT0Name, const wxChar *legacyT1Name)
|
||||
{ return mRegion.HandleXMLAttribute(
|
||||
attr, value, legacyT0Name, legacyT1Name ); }
|
||||
const wxChar *legacyT0Name, const wxChar *legacyT1Name);
|
||||
|
||||
// const-only access allows assignment from this into a SelectedRegion
|
||||
// or otherwise passing it into a function taking const SelectedRegion&
|
||||
@ -95,7 +93,7 @@ public:
|
||||
bool setF1(double f, bool maySwap = true);
|
||||
|
||||
private:
|
||||
void Notify();
|
||||
void Notify( bool delayed = false );
|
||||
|
||||
SelectedRegion mRegion;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user