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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user