mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-10 09:01:13 +02:00
Bug470: Disable some Manage Curves buttons when no curve selected
This commit is contained in:
parent
5b7e9518e2
commit
ad711e783b
@ -3183,6 +3183,10 @@ BEGIN_EVENT_TABLE(EditCurvesDialog, wxDialog)
|
|||||||
EVT_BUTTON(LibraryButtonID, EditCurvesDialog::OnLibrary)
|
EVT_BUTTON(LibraryButtonID, EditCurvesDialog::OnLibrary)
|
||||||
EVT_BUTTON(DefaultsButtonID, EditCurvesDialog::OnDefaults)
|
EVT_BUTTON(DefaultsButtonID, EditCurvesDialog::OnDefaults)
|
||||||
EVT_BUTTON(wxID_OK, EditCurvesDialog::OnOK)
|
EVT_BUTTON(wxID_OK, EditCurvesDialog::OnOK)
|
||||||
|
EVT_LIST_ITEM_SELECTED(CurvesListID,
|
||||||
|
EditCurvesDialog::OnListSelectionChange)
|
||||||
|
EVT_LIST_ITEM_DESELECTED(CurvesListID,
|
||||||
|
EditCurvesDialog::OnListSelectionChange)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
EditCurvesDialog::EditCurvesDialog(wxWindow * parent, EffectEqualization * effect, int position):
|
EditCurvesDialog::EditCurvesDialog(wxWindow * parent, EffectEqualization * effect, int position):
|
||||||
@ -3644,6 +3648,19 @@ void EditCurvesDialog::OnOK(wxCommandEvent & WXUNUSED(event))
|
|||||||
EndModal(true);
|
EndModal(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EditCurvesDialog::OnListSelectionChange( wxListEvent & )
|
||||||
|
{
|
||||||
|
const bool enable = mList->GetSelectedItemCount() > 0;
|
||||||
|
static const int ids[] = {
|
||||||
|
UpButtonID,
|
||||||
|
DownButtonID,
|
||||||
|
RenameButtonID,
|
||||||
|
DeleteButtonID,
|
||||||
|
};
|
||||||
|
for (auto id : ids)
|
||||||
|
FindWindowById(id, this)->Enable(enable);
|
||||||
|
}
|
||||||
|
|
||||||
#if wxUSE_ACCESSIBILITY
|
#if wxUSE_ACCESSIBILITY
|
||||||
|
|
||||||
SliderAx::SliderAx(wxWindow * window, const wxString &fmt) :
|
SliderAx::SliderAx(wxWindow * window, const wxString &fmt) :
|
||||||
|
@ -369,6 +369,8 @@ private:
|
|||||||
void OnLibrary( wxCommandEvent &event );
|
void OnLibrary( wxCommandEvent &event );
|
||||||
void OnDefaults( wxCommandEvent &event );
|
void OnDefaults( wxCommandEvent &event );
|
||||||
void OnOK(wxCommandEvent &event);
|
void OnOK(wxCommandEvent &event);
|
||||||
|
|
||||||
|
void OnListSelectionChange( wxListEvent &event );
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user