mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
* Set default button on all dialogs that do not already have a defined default button. The only exception is the EESchema net list dialog which needs converted over to wxFormBuilder and due to it's design makes setting the default button in any tab other than the default tab problematic. * Fix escape key dialog handling bug in EESchema print post script dialog.
51 lines
1.4 KiB
C++
51 lines
1.4 KiB
C++
#include "fctsys.h"
|
|
|
|
#include "dialog_lib_edit_pin.h"
|
|
|
|
|
|
DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent ) :
|
|
DIALOG_LIB_EDIT_PIN_BASE( parent )
|
|
{
|
|
/* Required to make escape key work correctly in wxGTK. */
|
|
m_textName->SetFocus();
|
|
m_sdbSizer1OK->SetDefault();
|
|
}
|
|
|
|
|
|
void DIALOG_LIB_EDIT_PIN::SetOrientationList( const wxArrayString& list,
|
|
const char*** aBitmaps )
|
|
{
|
|
for ( unsigned ii = 0; ii < list.GetCount(); ii++ )
|
|
{
|
|
if( aBitmaps == NULL )
|
|
m_choiceOrientation->Append( list[ii] );
|
|
else
|
|
m_choiceOrientation->Insert( list[ii], wxBitmap( aBitmaps[ii] ), ii );
|
|
}
|
|
}
|
|
|
|
|
|
void DIALOG_LIB_EDIT_PIN::SetElectricalTypeList( const wxArrayString& list,
|
|
const char*** aBitmaps )
|
|
{
|
|
for ( unsigned ii = 0; ii < list.GetCount(); ii++ )
|
|
{
|
|
if( aBitmaps == NULL )
|
|
m_choiceElectricalType->Append( list[ii] );
|
|
else
|
|
m_choiceElectricalType->Insert( list[ii], wxBitmap( aBitmaps[ii] ), ii );
|
|
}
|
|
}
|
|
|
|
|
|
void DIALOG_LIB_EDIT_PIN::SetStyleList( const wxArrayString& list, const char*** aBitmaps )
|
|
{
|
|
for ( unsigned ii = 0; ii < list.GetCount(); ii++ )
|
|
{
|
|
if( aBitmaps == NULL )
|
|
m_choiceStyle->Append( list[ii] );
|
|
else
|
|
m_choiceStyle->Insert( list[ii], wxBitmap( aBitmaps[ii] ), ii );
|
|
}
|
|
}
|