Commit fa73d544 authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: fix strange things in module edit dialogs.

parent 02b5b477
......@@ -7,9 +7,9 @@
#ifndef KICAD_BUILD_VERSION
#if defined KICAD_GOST
# define KICAD_BUILD_VERSION "(2013-feb-26 GOST)"
# define KICAD_BUILD_VERSION "(2013-mar-04 GOST)"
#else
# define KICAD_BUILD_VERSION "(2013-feb-26)"
# define KICAD_BUILD_VERSION "(2013-mar-04)"
#endif
#endif
......
......@@ -65,7 +65,6 @@ DIALOG_MODULE_BOARD_EDITOR::DIALOG_MODULE_BOARD_EDITOR( PCB_EDIT_FRAME* aParent
InitBoardProperties();
m_sdbSizerStdButtonsOK->SetDefault();
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
Centre();
}
......@@ -328,6 +327,10 @@ void DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties()
m_3D_ShapeNameListBox->SetSelection( m_LastSelected3DShapeIndex );
Transfert3DValuesToDisplay( m_Shapes3D_list[m_LastSelected3DShapeIndex] );
}
// We have modified the UI, so call Fit() for m_Panel3D
// to be sure the m_Panel3D sizers are initiliazed before opening the dialog
m_Panel3D->GetSizer()->Fit( m_Panel3D );
}
......
......@@ -128,7 +128,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
wxString m_AutoPlaceCtrlChoices[] = { _("Free"), _("Locked") };
int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString );
m_AutoPlaceCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Move and Auto Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AutoPlaceCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Move and Place:"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AutoPlaceCtrl->SetSelection( 0 );
bSizer12->Add( m_AutoPlaceCtrl, 1, wxALL|wxEXPAND, 5 );
......@@ -136,7 +136,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
m_PropRightSizer->Add( bSizer12, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerAutoplace;
sbSizerAutoplace = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Move and Place") ), wxHORIZONTAL );
sbSizerAutoplace = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Place:") ), wxHORIZONTAL );
wxBoxSizer* bSizerRotOpt;
bSizerRotOpt = new wxBoxSizer( wxVERTICAL );
......
......@@ -1718,7 +1718,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Move and Auto Place</property>
<property name="label">Move and Place:</property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -1783,7 +1783,7 @@
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="0">
<property name="id">wxID_ANY</property>
<property name="label">Auto Move and Place</property>
<property name="label">Auto Place:</property>
<property name="minimum_size"></property>
<property name="name">sbSizerAutoplace</property>
<property name="orient">wxHORIZONTAL</property>
......
......@@ -62,7 +62,6 @@ DIALOG_MODULE_MODULE_EDITOR::DIALOG_MODULE_MODULE_EDITOR( FOOTPRINT_EDIT_FRAME*
initModeditProperties();
m_sdbSizerStdButtonsOK->SetDefault();
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
Centre();
}
......@@ -208,6 +207,10 @@ void DIALOG_MODULE_MODULE_EDITOR::initModeditProperties()
m_3D_ShapeNameListBox->SetSelection( m_lastSelected3DShapeIndex );
Transfert3DValuesToDisplay( m_shapes3D_list[m_lastSelected3DShapeIndex] );
}
// We have modified the UI, so call Fit() for m_Panel3D
// to be sure the m_Panel3D sizers are initialized before opening the dialog
m_Panel3D->GetSizer()->Fit( m_Panel3D );
}
......
......@@ -76,25 +76,44 @@ DIALOG_MODULE_MODULE_EDITOR_BASE::DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* pa
PropLeftSizer->Add( 0, 20, 0, 0, 5 );
wxStaticBoxSizer* sbSizerFootprintName;
sbSizerFootprintName = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Footprint Name in Lib") ), wxHORIZONTAL );
m_FootprintNameCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_FootprintNameCtrl->SetMaxLength( 0 );
sbSizerFootprintName->Add( m_FootprintNameCtrl, 1, 0, 5 );
sbSizerFootprintName->Add( 0, 0, 0, 0, 5 );
PropLeftSizer->Add( sbSizerFootprintName, 0, wxEXPAND, 5 );
m_PanelPropertiesBoxSizer->Add( PropLeftSizer, 1, wxEXPAND, 5 );
m_PropRightSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerAttrib;
bSizerAttrib = new wxBoxSizer( wxHORIZONTAL );
wxString m_AttributsCtrlChoices[] = { _("Normal"), _("Normal+Insert"), _("Virtual") };
int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString );
m_AttributsCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Attributs:"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AttributsCtrl->SetSelection( 0 );
m_PropRightSizer->Add( m_AttributsCtrl, 0, wxALL|wxEXPAND, 5 );
bSizerAttrib->Add( m_AttributsCtrl, 1, wxALL|wxEXPAND, 5 );
wxString m_AutoPlaceCtrlChoices[] = { _("Free"), _("Locked") };
int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString );
m_AutoPlaceCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Move and Auto Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AutoPlaceCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Move and Place:"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AutoPlaceCtrl->SetSelection( 0 );
m_PropRightSizer->Add( m_AutoPlaceCtrl, 0, wxALL|wxEXPAND, 5 );
bSizerAttrib->Add( m_AutoPlaceCtrl, 1, wxEXPAND|wxALL, 5 );
m_PropRightSizer->Add( bSizerAttrib, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerAutoplace;
sbSizerAutoplace = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Move and Place") ), wxHORIZONTAL );
sbSizerAutoplace = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Place:") ), wxHORIZONTAL );
wxBoxSizer* bSizerRot90;
bSizerRot90 = new wxBoxSizer( wxVERTICAL );
......@@ -174,19 +193,6 @@ DIALOG_MODULE_MODULE_EDITOR_BASE::DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* pa
m_SolderMaskMarginUnits->Wrap( -1 );
fgSizer1->Add( m_SolderMaskMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
wxStaticBoxSizer* sbSizerFootprintName;
sbSizerFootprintName = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Footprint Name in Lib") ), wxHORIZONTAL );
m_FootprintNameCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_FootprintNameCtrl->SetMaxLength( 0 );
sbSizerFootprintName->Add( m_FootprintNameCtrl, 1, 0, 5 );
sbSizerFootprintName->Add( 0, 0, 0, 0, 5 );
fgSizer1->Add( sbSizerFootprintName, 0, wxEXPAND, 5 );
m_staticTextSolderPaste = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSolderPaste->Wrap( -1 );
m_staticTextSolderPaste->SetToolTip( _("This is the local clearance between pads and the solder paste\nfor this footprint.\nThis value can be superseded by a pad local values.\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") );
......
......@@ -59,6 +59,7 @@ class DIALOG_MODULE_MODULE_EDITOR_BASE : public DIALOG_SHIM
wxButton* m_button4;
wxTextCtrl* m_ValueCtrl;
wxButton* m_button5;
wxTextCtrl* m_FootprintNameCtrl;
wxRadioBox* m_AttributsCtrl;
wxRadioBox* m_AutoPlaceCtrl;
wxStaticText* m_staticText11;
......@@ -75,7 +76,6 @@ class DIALOG_MODULE_MODULE_EDITOR_BASE : public DIALOG_SHIM
wxStaticText* m_MaskClearanceTitle;
wxTextCtrl* m_SolderMaskMarginCtrl;
wxStaticText* m_SolderMaskMarginUnits;
wxTextCtrl* m_FootprintNameCtrl;
wxStaticText* m_staticTextSolderPaste;
wxTextCtrl* m_SolderPasteMarginCtrl;
wxStaticText* m_SolderPasteMarginUnits;
......
......@@ -722,7 +722,7 @@ void PCB_EDIT_FRAME::createPopUpMenuForFootprints( MODULE* aModule, wxMenu* menu
if( !flags )
{
msg = AddHotkeyName( _( "Edit Prms" ),
msg = AddHotkeyName( _( "Edit Parameters" ),
g_Board_Editor_Hokeys_Descr, HK_EDIT_ITEM );
AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_EDIT_MODULE_PRMS, msg,
KiBitmap( edit_module_xpm ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment