mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 08:09:32 +02:00
Bug 2119 - Linux: Incorrect behaviors in "Manage Macro"
This commit is contained in:
parent
2852d07a1e
commit
fb11eeaedd
@ -922,26 +922,34 @@ void MacrosWindow::OnMacrosBeginEdit(wxListEvent &event)
|
|||||||
|
|
||||||
wxString macro = mMacros->GetItemText(itemNo);
|
wxString macro = mMacros->GetItemText(itemNo);
|
||||||
|
|
||||||
if (mMacroCommands.IsFixed(mActiveMacro)) {
|
if (mMacroCommands.IsFixed(macro)) {
|
||||||
wxBell();
|
wxBell();
|
||||||
event.Veto();
|
event.Veto();
|
||||||
}
|
}
|
||||||
|
if( mMacroBeingRenamed.IsEmpty())
|
||||||
|
mMacroBeingRenamed = macro;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
void MacrosWindow::OnMacrosEndEdit(wxListEvent &event)
|
void MacrosWindow::OnMacrosEndEdit(wxListEvent &event)
|
||||||
{
|
{
|
||||||
if (event.IsEditCancelled()) {
|
if (event.IsEditCancelled()) {
|
||||||
|
mMacroBeingRenamed = "";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( mMacroBeingRenamed.IsEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
wxString newname = event.GetLabel();
|
wxString newname = event.GetLabel();
|
||||||
|
|
||||||
mMacroCommands.RenameMacro(mActiveMacro, newname);
|
mMacroCommands.RenameMacro(mMacroBeingRenamed, newname);
|
||||||
|
if( mMacroBeingRenamed == mActiveMacro )
|
||||||
mActiveMacro = newname;
|
mActiveMacro = newname;
|
||||||
|
mMacroBeingRenamed="";
|
||||||
PopulateMacros();
|
PopulateMacros();
|
||||||
|
UpdateMenus();
|
||||||
|
event.Veto();
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -58,6 +58,7 @@ class ApplyMacroDialog : public wxDialogWrapper {
|
|||||||
bool mAbort;
|
bool mAbort;
|
||||||
bool mbExpanded;
|
bool mbExpanded;
|
||||||
wxString mActiveMacro;
|
wxString mActiveMacro;
|
||||||
|
wxString mMacroBeingRenamed;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const MacroCommandsCatalog mCatalog;
|
const MacroCommandsCatalog mCatalog;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user