1
0
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:
Vitaly Sverchinsky
2021-07-21 19:48:32 +03:00
parent 068ef4c36f
commit b90b5cfd47
11 changed files with 307 additions and 296 deletions

View File

@@ -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 );

View File

@@ -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