Fix for 1891 is specific to Mac / Linux

This is only really a temporary fix - we should be using the
standard "Manage" button, but imo Equalization require a
thorough overhaul.
This commit is contained in:
Steve Daulton 2018-06-21 15:55:20 +01:00
parent 8a158c741e
commit f145574dd6
1 changed files with 10 additions and 0 deletions

View File

@ -3460,6 +3460,15 @@ void EditCurvesDialog::OnDelete(wxCommandEvent & WXUNUSED(event))
int deleted = 0;
while(item >= 0)
{
#if defined(__WXMSW__)
// TODO: Migrate to the standard "Manage" dialog.
if(item == mList->GetItemCount()-1) //unnamed
{
mEffect->Effect::MessageBox(_("You cannot delete the 'unnamed' curve, it is special."),
Effect::DefaultMessageBoxStyle,
_("Can't delete 'unnamed'"));
}
#else
if(mEditCurves[ item ].Name.IsSameAs(wxT("unnamed")))
{
/* i18n-hint: Special EQ curve is protected against deletion.*/
@ -3468,6 +3477,7 @@ void EditCurvesDialog::OnDelete(wxCommandEvent & WXUNUSED(event))
/* i18n-hint: Special EQ curve is protected against deletion.*/
wxString::Format(_("Can't delete %s"), wxT("'unnamed'")));
}
#endif
else
{
mEditCurves.erase( mEditCurves.begin() + item - deleted );