1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-06 14:35:32 +01:00

Allow blanks labels to be retained when leaving the Label Editor.

This commit is contained in:
lllucius
2013-09-24 05:29:37 +00:00
parent f8a4adf713
commit 5c4ac939db
2 changed files with 21 additions and 18 deletions

View File

@@ -306,8 +306,15 @@ void ChoiceEditor::BeginEdit(int row, int col, wxGrid* grid)
bool ChoiceEditor::EndEdit(int row, int col,
wxGrid* grid)
{
wxString val = mChoices[Choice()->GetSelection()];
int sel = Choice()->GetSelection();
// This can happen if the wxChoice control is displayed and the list of choices get changed
if (sel < 0 || sel >= mChoices.GetCount())
{
return false;
}
wxString val = mChoices[sel];
if (val == mOld)
return false;