mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-09 06:06:24 +01:00
Splitting mSelIndex
Using mTextEditIndex for tracking active text box index, and mNavigationIndex used to track selection for keyboard navigation purposes See #1195
This commit is contained in:
@@ -46,7 +46,7 @@ bool DoPasteText(AudacityProject &project)
|
||||
for (auto pLabelTrack : tracks.Any<LabelTrack>())
|
||||
{
|
||||
// Does this track have an active label?
|
||||
if (LabelTrackView::Get( *pLabelTrack ).HasSelection( project )) {
|
||||
if (LabelTrackView::Get( *pLabelTrack ).GetTextEditIndex(project) != -1) {
|
||||
|
||||
// Yes, so try pasting into it
|
||||
auto &view = LabelTrackView::Get( *pLabelTrack );
|
||||
|
||||
@@ -346,7 +346,7 @@ void OnPasteNewLabel(const CommandContext &context)
|
||||
// Unselect the last label, so we'll have just one active label when
|
||||
// we're done
|
||||
if (plt)
|
||||
LabelTrackView::Get( *plt ).SetSelectedIndex( -1 );
|
||||
LabelTrackView::Get( *plt ).ResetTextSelection();
|
||||
|
||||
// Add a NEW label, paste into it
|
||||
// Paul L: copy whatever defines the selected region, not just times
|
||||
|
||||
Reference in New Issue
Block a user