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