1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Don't cut or copy TimeTrack...

... Which was the intention in the flags enabling the commands
This commit is contained in:
Paul Licameli 2021-02-02 14:44:28 -05:00
parent badb1643fa
commit 2842fa7d56

View File

@ -263,10 +263,12 @@ void OnCut(const CommandContext &context)
}, },
#endif #endif
[&](Track *n) { [&](Track *n) {
if (n->SupportsBasicEditing()) {
auto dest = n->Copy(selectedRegion.t0(), auto dest = n->Copy(selectedRegion.t0(),
selectedRegion.t1()); selectedRegion.t1());
FinishCopy(n, dest, newClipboard); FinishCopy(n, dest, newClipboard);
} }
}
); );
// Survived possibility of exceptions. Commit changes to the clipboard now. // Survived possibility of exceptions. Commit changes to the clipboard now.
@ -298,8 +300,8 @@ void OnCut(const CommandContext &context)
fallthrough(); fallthrough();
}, },
[&](Track *n) { [&](Track *n) {
n->Clear(selectedRegion.t0(), if (n->SupportsBasicEditing())
selectedRegion.t1()); n->Clear(selectedRegion.t0(), selectedRegion.t1());
} }
); );
@ -359,10 +361,12 @@ void OnCopy(const CommandContext &context)
auto &newClipboard = *pNewClipboard; auto &newClipboard = *pNewClipboard;
for (auto n : tracks.Selected()) { for (auto n : tracks.Selected()) {
if (n->SupportsBasicEditing()) {
auto dest = n->Copy(selectedRegion.t0(), auto dest = n->Copy(selectedRegion.t0(),
selectedRegion.t1()); selectedRegion.t1());
FinishCopy(n, dest, newClipboard); FinishCopy(n, dest, newClipboard);
} }
}
// Survived possibility of exceptions. Commit changes to the clipboard now. // Survived possibility of exceptions. Commit changes to the clipboard now.
clipboard.Assign( std::move( newClipboard ), clipboard.Assign( std::move( newClipboard ),