1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Fewer naked news and deletes in Tags.cpp and LabelDialog.cpp

This commit is contained in:
Paul Licameli
2016-04-08 21:16:18 -04:00
parent c87eb0804b
commit 42fcfdab98
2 changed files with 14 additions and 14 deletions

View File

@@ -121,7 +121,7 @@ LabelDialog::LabelDialog(wxWindow *parent,
5);
// Create the main sizer
mGrid = new Grid(this, wxID_ANY);
mGrid = safenew Grid(this, wxID_ANY);
vs->Add(mGrid, 1, wxEXPAND | wxALL, 5);
// Create the action buttons
@@ -162,20 +162,18 @@ LabelDialog::LabelDialog(wxWindow *parent,
mTimeEditor = (TimeEditor *) mGrid->GetDefaultEditorForType(GRID_VALUE_TIME);
// Initialize and set the track name column attributes
wxGridCellAttr *attr = new wxGridCellAttr();
wxGridCellAttr *attr;
mGrid->SetColAttr(Col_Track, (attr = safenew wxGridCellAttr));
attr->SetEditor(mChoiceEditor);
mGrid->SetColAttr(Col_Track, attr);
mTrackNames.Add(_("New..."));
// Initialize and set the time column attributes
attr = new wxGridCellAttr();
mGrid->SetColAttr(Col_Stime, (attr = safenew wxGridCellAttr));
// Don't need DecRef() after this GetDefaultRendererForType.
attr->SetRenderer(mGrid->GetDefaultRendererForType(GRID_VALUE_TIME));
attr->SetEditor(mTimeEditor);
attr->SetAlignment(wxALIGN_CENTER, wxALIGN_CENTER);
mGrid->SetColAttr(Col_Stime, attr);
mGrid->SetColAttr(Col_Etime, attr->Clone());
// Seems there's a bug in wxGrid. Adding only 1 row does not