diff --git a/common/dialogs/panel_setup_netclasses.cpp b/common/dialogs/panel_setup_netclasses.cpp index 7a12c729fb..f9b2cd1670 100644 --- a/common/dialogs/panel_setup_netclasses.cpp +++ b/common/dialogs/panel_setup_netclasses.cpp @@ -114,7 +114,6 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA m_splitter->SetMinimumPaneSize( FromDIP( m_splitter->GetMinimumPaneSize() ) ); - m_originalColWidths = new int[ m_netclassGrid->GetNumberCols() ]; // Calculate a min best size to handle longest usual numeric values: int const min_best_width = m_netclassGrid->GetTextExtent( "555,555555 mils" ).x; @@ -249,8 +248,6 @@ PANEL_SETUP_NETCLASSES::~PANEL_SETUP_NETCLASSES() COMMON_SETTINGS* cfg = Pgm().GetCommonSettings(); cfg->m_NetclassPanel.sash_pos = m_splitter->GetSashPosition(); - delete [] m_originalColWidths; - // Delete the GRID_TRICKS. m_netclassGrid->PopEventHandler( true ); m_assignmentGrid->PopEventHandler( true ); diff --git a/include/dialogs/panel_setup_netclasses.h b/include/dialogs/panel_setup_netclasses.h index dcc96cca58..36b23c0c28 100644 --- a/include/dialogs/panel_setup_netclasses.h +++ b/include/dialogs/panel_setup_netclasses.h @@ -83,7 +83,7 @@ private: std::map> m_lastLoaded; int m_lastCheckedTicker; - int* m_originalColWidths; + std::vector m_originalColWidths; bool m_netclassesDirty; // The netclass drop-down menus need rebuilding int m_hoveredCol; // Column being hovered over, for tooltips wxString m_lastPattern;