diff --git a/cwPresetSel.cpp b/cwPresetSel.cpp index 07f17f9..121a223 100644 --- a/cwPresetSel.cpp +++ b/cwPresetSel.cpp @@ -1097,6 +1097,19 @@ unsigned cw::preset_sel::gui_to_frag_id( handle_t h, unsigned guiUuId, bool show return kInvalidId; } +unsigned cw::preset_sel::loc_to_gui_id( handle_t h, unsigned loc ) +{ + preset_sel_t* p = _handleToPtr(h); + frag_t* f; + + if((f = _fast_loc_to_frag( p, loc)) == nullptr ) + return kInvalidId; + + return f->guiUuId; + +} + + cw::rc_t cw::preset_sel::create_fragment( handle_t h, unsigned end_loc, time::spec_t end_timestamp, unsigned& fragIdRef ) { diff --git a/cwPresetSel.h b/cwPresetSel.h index 28007b8..b395cf4 100644 --- a/cwPresetSel.h +++ b/cwPresetSel.h @@ -95,6 +95,7 @@ namespace cw unsigned frag_to_gui_id( handle_t h, unsigned fragId, bool showErrorFl=true ); unsigned gui_to_frag_id( handle_t h, unsigned guiUuId, bool showErrorFl=true ); + unsigned loc_to_gui_id( handle_t h, unsigned loc ); rc_t create_fragment( handle_t h, unsigned end_loc, time::spec_t endTimestamp, unsigned& fragIdRef ); rc_t delete_fragment( handle_t h, unsigned fragId );