cwPresetSel.cpp : Prevent track_loc() from going backwards to a previous 'loc'.
This commit is contained in:
parent
84a3c3ceff
commit
137e0994d3
@ -910,8 +910,12 @@ bool cw::preset_sel::track_loc( handle_t h, unsigned loc, const cw::preset_sel::
|
|||||||
// if 'f' is valid but different from 'last_ts_frag'
|
// if 'f' is valid but different from 'last_ts_frag'
|
||||||
if( f != nullptr && f != p->last_ts_frag )
|
if( f != nullptr && f != p->last_ts_frag )
|
||||||
{
|
{
|
||||||
p->last_ts_frag = f;
|
// don't allow the selected fragment to go backwards
|
||||||
frag_changed_fl = true;
|
if( p->last_ts_frag == nullptr || (p->last_ts_frag != nullptr && p->last_ts_frag->endLoc < f->endLoc) )
|
||||||
|
{
|
||||||
|
p->last_ts_frag = f;
|
||||||
|
frag_changed_fl = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
frag_Ref = p->last_ts_frag;
|
frag_Ref = p->last_ts_frag;
|
||||||
|
@ -115,6 +115,7 @@ namespace cw
|
|||||||
void track_timestamp_reset( handle_t h );
|
void track_timestamp_reset( handle_t h );
|
||||||
bool track_timestamp( handle_t h, const time::spec_t& ts, const cw::preset_sel::frag_t*& frag_Ref );
|
bool track_timestamp( handle_t h, const time::spec_t& ts, const cw::preset_sel::frag_t*& frag_Ref );
|
||||||
|
|
||||||
|
// Same as track_timestamp_???() but tracks the score 'loc' instead of timestamp.
|
||||||
void track_loc_reset( handle_t h );
|
void track_loc_reset( handle_t h );
|
||||||
bool track_loc( handle_t h, unsigned loc, const cw::preset_sel::frag_t*& frag_Ref );
|
bool track_loc( handle_t h, unsigned loc, const cw::preset_sel::frag_t*& frag_Ref );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user