Commit 74723335 authored by charras's avatar charras

minor bugs fix.

parent dd5a407f
......@@ -74,13 +74,13 @@ public:
}
bool GetEnableAutoPan( void ) { return m_checkAutoPan->GetValue(); }
void SetEnableAnyBusOrientation( bool enable )
void SetEnableHVBusOrientation( bool enable )
{
m_checkAnyOrientation->SetValue( enable );
m_checkHVOrientation->SetValue( enable );
}
bool GetEnableAnyBusOrientation( void )
bool GetEnableHVBusOrientation( void )
{
return m_checkAnyOrientation->GetValue();
return m_checkHVOrientation->GetValue();
}
void SetShowPageLimits( bool show )
......
......@@ -127,9 +127,9 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
bSizer2->Add( m_checkAutoPan, 0, wxALL|wxEXPAND, 3 );
m_checkAnyOrientation = new wxCheckBox( this, wxID_ANY, _("Allow buses and wires to be placed in any &orientation"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkHVOrientation = new wxCheckBox( this, wxID_ANY, _("Allow buses and wires to be placed in H or V &orientation only"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_checkAnyOrientation, 0, wxALL|wxEXPAND, 3 );
bSizer2->Add( m_checkHVOrientation, 0, wxALL|wxEXPAND, 3 );
m_checkPageLimits = new wxCheckBox( this, wxID_ANY, _("Show p&age limits"), wxDefaultPosition, wxDefaultSize, 0 );
......
......@@ -1289,10 +1289,10 @@
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Allow buses and wires to be placed in any &amp;orientation</property>
<property name="label">Allow buses and wires to be placed in H or V &amp;orientation only</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_checkAnyOrientation</property>
<property name="name">m_checkHVOrientation</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
......
......@@ -62,7 +62,7 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public wxDialog
wxCheckBox* m_checkShowGrid;
wxCheckBox* m_checkShowHiddenPins;
wxCheckBox* m_checkAutoPan;
wxCheckBox* m_checkAnyOrientation;
wxCheckBox* m_checkHVOrientation;
wxCheckBox* m_checkPageLimits;
wxStdDialogButtonSizer* m_sdbSizer1;
......
......@@ -123,7 +123,7 @@ void WinEDA_SchematicFrame::OnSetOptions( wxCommandEvent& event )
dlg.SetShowGrid( IsGridVisible() );
dlg.SetShowHiddenPins( m_ShowAllPins );
dlg.SetEnableAutoPan( DrawPanel->m_AutoPAN_Enable );
dlg.SetEnableAnyBusOrientation( g_HVLines );
dlg.SetEnableHVBusOrientation( g_HVLines );
dlg.SetShowPageLimits( g_ShowPageLimits );
dlg.Layout();
dlg.Fit();
......
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -474,6 +474,46 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
g_Current_PadName = m_PadNumCtrl->GetValue().Left( 4 );
Current_PadNetName = m_PadNetNameCtrl->GetValue();
// Clear some values, according to the pad type and shape
switch( g_Pad_Master.m_PadShape )
{
case PAD_CIRCLE:
g_Pad_Master.m_Offset = wxSize( 0, 0 );
g_Pad_Master.m_DeltaSize = wxSize( 0, 0 );
g_Pad_Master.m_Size.y = m_CurrentPad->m_Size.x;
break;
case PAD_RECT:
g_Pad_Master.m_DeltaSize = wxSize( 0, 0 );
break;
case PAD_OVAL:
g_Pad_Master.m_DeltaSize = wxSize( 0, 0 );
break;
case PAD_TRAPEZOID:
break;
}
switch( g_Pad_Master.m_Attribut )
{
case PAD_STANDARD:
break;
case PAD_CONN:
case PAD_SMD:
g_Pad_Master.m_Offset = wxSize( 0, 0 );
g_Pad_Master.m_Drill = wxSize( 0, 0 );
break;
case PAD_HOLE_NOT_PLATED:
break;
default:
DisplayError( this, wxT( "Error: unknown pad type" ) );
break;
}
/* Test for incorrect values */
if( (g_Pad_Master.m_Size.x < g_Pad_Master.m_Drill.x)
|| (g_Pad_Master.m_Size.y < g_Pad_Master.m_Drill.y) )
......@@ -583,44 +623,6 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
}
}
switch( m_CurrentPad->m_PadShape )
{
case PAD_CIRCLE:
m_CurrentPad->m_DeltaSize = wxSize( 0, 0 );
m_CurrentPad->m_Size.y = m_CurrentPad->m_Size.x;
break;
case PAD_RECT:
m_CurrentPad->m_DeltaSize = wxSize( 0, 0 );
break;
case PAD_OVAL:
m_CurrentPad->m_DeltaSize = wxSize( 0, 0 );
break;
case PAD_TRAPEZOID:
break;
}
switch( m_CurrentPad->m_Attribut )
{
case PAD_STANDARD:
break;
case PAD_CONN:
case PAD_SMD:
m_CurrentPad->m_Offset = wxSize( 0, 0 );
m_CurrentPad->m_Drill = wxSize( 0, 0 );
break;
case PAD_HOLE_NOT_PLATED:
break;
default:
DisplayError( this, wxT( "Error: unknown pad type" ) );
break;
}
m_CurrentPad->m_LocalClearance = g_Pad_Master.m_LocalClearance;
m_CurrentPad->m_LocalSolderMaskMargin = g_Pad_Master.m_LocalSolderMaskMargin;
m_CurrentPad->m_LocalSolderPasteMargin = g_Pad_Master.m_LocalSolderPasteMargin;
......
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