libedit: Small edit component cleanup

Initialize local variables and ensure that the SPICE edit button is not
shown in compiles that do not support it.
This commit is contained in:
Seth Hillbrand 2019-01-12 06:58:40 -08:00
parent 634d02bd04
commit a0a4e5e18d
1 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,8 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( LIB_EDIT_FRA
m_pinNameOffset( aParent, m_nameOffsetLabel, m_nameOffsetCtrl, m_nameOffsetUnits, true ),
m_delayedFocusCtrl( nullptr ),
m_delayedFocusGrid( nullptr ),
m_delayedFocusRow( -1 ),
m_delayedFocusColumn( -1 ),
m_delayedFocusPage( -1 )
{
m_config = Kiface().KifaceSettings();
@ -117,6 +119,10 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( LIB_EDIT_FRA
m_stdSizerButtonOK->SetDefault();
#ifndef KICAD_SPICE
m_spiceFieldsButton->Hide();
#endif
// wxFormBuilder doesn't include this event...
m_grid->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnGridCellChanging ), NULL, this );
m_aliasGrid->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAliasGridCellChanging ), NULL, this );