1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-17 00:07:54 +01:00

More uses of safenew for classes we derive from wxWindow classes...

... Also removed some unnecessary deletes of widgets that are managed by parent
windows
This commit is contained in:
Paul Licameli
2016-02-14 02:54:25 -05:00
parent 3f237daddc
commit df6a7c5464
70 changed files with 151 additions and 120 deletions

View File

@@ -146,28 +146,28 @@ void SpectralSelectionBar::Populate()
wxBoxSizer *subSizer = new wxBoxSizer(wxHORIZONTAL);
mCenterCtrl = new NumericTextCtrl(
mCenterCtrl = safenew NumericTextCtrl(
NumericConverter::FREQUENCY, this, OnCenterID, frequencyFormatName, 0.0);
mCenterCtrl->SetInvalidValue(SelectedRegion::UndefinedFrequency);
mCenterCtrl->SetName(_("Center Frequency:"));
mCenterCtrl->EnableMenu();
subSizer->Add(mCenterCtrl, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
mWidthCtrl = new NumericTextCtrl(
mWidthCtrl = safenew NumericTextCtrl(
NumericConverter::BANDWIDTH, this, OnWidthID, bandwidthFormatName, 0.0);
mWidthCtrl->SetInvalidValue(-1.0);
mWidthCtrl->SetName(wxString(_("Bandwidth:")));
mWidthCtrl->EnableMenu();
subSizer->Add(mWidthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 0);
mLowCtrl = new NumericTextCtrl(
mLowCtrl = safenew NumericTextCtrl(
NumericConverter::FREQUENCY, this, OnLowID, frequencyFormatName, 0.0);
mLowCtrl->SetInvalidValue(SelectedRegion::UndefinedFrequency);
mLowCtrl->SetName(_("Low Frequency:"));
mLowCtrl->EnableMenu();
subSizer->Add(mLowCtrl, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
mHighCtrl = new NumericTextCtrl(
mHighCtrl = safenew NumericTextCtrl(
NumericConverter::FREQUENCY, this, OnHighID, frequencyFormatName, 0.0);
mHighCtrl->SetInvalidValue(SelectedRegion::UndefinedFrequency);
mHighCtrl->SetName(wxString(_("High Frequency:")));