mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 15:49:41 +02:00
Bug2600: Should rename current undo state after compacting
This commit is contained in:
parent
6944ba564c
commit
ebb6e5de1c
@ -1272,5 +1272,9 @@ void ProjectFileManager::Compact()
|
||||
.Format(Internat::FormatSize((before - after).GetValue())),
|
||||
XO("Compact Project"));
|
||||
}
|
||||
|
||||
undoManager.RenameState( undoManager.GetCurrentState(),
|
||||
XO("Compacted project file"),
|
||||
XO("Compact") );
|
||||
}
|
||||
}
|
||||
|
@ -308,6 +308,17 @@ void UndoManager::ModifyState(const TrackList * l,
|
||||
mProject.QueueEvent( safenew wxCommandEvent{ EVT_UNDO_MODIFIED } );
|
||||
}
|
||||
|
||||
void UndoManager::RenameState( int state,
|
||||
const TranslatableString &longDescription,
|
||||
const TranslatableString &shortDescription)
|
||||
{
|
||||
if (state >= 0 && state < stack.size() ) {
|
||||
auto &theState = *stack[state];
|
||||
theState.description = longDescription;
|
||||
theState.shortDescription = shortDescription;
|
||||
}
|
||||
}
|
||||
|
||||
void UndoManager::PushState(const TrackList * l,
|
||||
const SelectedRegion &selectedRegion,
|
||||
const std::shared_ptr<Tags> &tags,
|
||||
|
@ -151,6 +151,9 @@ class AUDACITY_DLL_API UndoManager final
|
||||
UndoPush flags = UndoPush::NONE);
|
||||
void ModifyState(const TrackList * l,
|
||||
const SelectedRegion &selectedRegion, const std::shared_ptr<Tags> &tags);
|
||||
void RenameState( int state,
|
||||
const TranslatableString &longDescription,
|
||||
const TranslatableString &shortDescription);
|
||||
void AbandonRedo();
|
||||
void ClearStates();
|
||||
void RemoveStates(
|
||||
|
Loading…
x
Reference in New Issue
Block a user