MCPcopy Create free account
hub / github.com/audacity/audacity / OnOK

Method OnOK

src/effects/EqualizationCurvesDialog.cpp:507–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507void EqualizationCurvesDialog::OnOK(wxCommandEvent & WXUNUSED(event))
508{
509 {
510 // Make a backup of the current curves
511 wxString backupPlace =
512 wxFileName( FileNames::DataDir(), wxT("EQBackup.xml") ).GetFullPath();
513 EQCurveWriter writer{ mCurves };
514 writer.SaveCurves(backupPlace);
515 // Load back into the main dialog
516 mCurves = mEditCurves;
517 // Save to default place
518 writer.SaveCurves();
519 } // scope of writer
520 EQCurveReader{ mCurves, mName, mOptions }.LoadCurves();
521
522 // Select something sensible
523 long item = mList->GetNextItem(-1,
524 wxLIST_NEXT_ALL,
525 wxLIST_STATE_SELECTED);
526 if (item == -1)
527 item = mList->GetItemCount()-1; // nothing selected, default to 'unnamed'
528 mItem = item;
529 EndModal(true);
530}
531
532void EqualizationCurvesDialog::OnListSelectionChange( wxListEvent & )
533{

Callers

nothing calls this directly

Calls 3

SaveCurvesMethod · 0.80
LoadCurvesMethod · 0.80
wxFileNameClass · 0.50

Tested by

no test coverage detected