Custom pads: allows solid connection to zones.
The 2 options are now: no connection and solid connection
This commit is contained in:
parent
17f6d09935
commit
d52491c715
|
@ -620,18 +620,22 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
|||
default:
|
||||
case PAD_ZONE_CONN_INHERITED:
|
||||
m_ZoneConnectionChoice->SetSelection( 0 );
|
||||
m_ZoneConnectionCustom->SetSelection( 0 );
|
||||
break;
|
||||
|
||||
case PAD_ZONE_CONN_FULL:
|
||||
m_ZoneConnectionChoice->SetSelection( 1 );
|
||||
m_ZoneConnectionCustom->SetSelection( 1 );
|
||||
break;
|
||||
|
||||
case PAD_ZONE_CONN_THERMAL:
|
||||
m_ZoneConnectionChoice->SetSelection( 2 );
|
||||
m_ZoneConnectionCustom->SetSelection( 0 );
|
||||
break;
|
||||
|
||||
case PAD_ZONE_CONN_NONE:
|
||||
m_ZoneConnectionChoice->SetSelection( 3 );
|
||||
m_ZoneConnectionCustom->SetSelection( 0 );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -933,9 +937,10 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
|
|||
m_tcCornerSizeRatio->Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT );
|
||||
|
||||
// PAD_SHAPE_CUSTOM type has constraints for zone connection and thermal shape:
|
||||
// only not connected is allowed to avoid destroying the shape.
|
||||
// only not connected or solid connection is allowed to avoid destroying the shape.
|
||||
// Enable/disable options only available for custom shaped pads
|
||||
m_ZoneConnectionChoice->Enable( !is_custom );
|
||||
m_ZoneConnectionCustom->Enable( is_custom );
|
||||
m_ThermalWidthCtrl->Enable( !is_custom );
|
||||
m_ThermalGapCtrl->Enable( !is_custom );
|
||||
|
||||
|
@ -1486,7 +1491,12 @@ bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow()
|
|||
m_currentPad->SetRoundRectRadiusRatio( m_padMaster->GetRoundRectRadiusRatio() );
|
||||
|
||||
if( m_currentPad->GetShape() == PAD_SHAPE_CUSTOM )
|
||||
m_currentPad->SetZoneConnection( PAD_ZONE_CONN_NONE );
|
||||
{
|
||||
if( m_padMaster->GetZoneConnection() == PAD_ZONE_CONN_FULL )
|
||||
m_currentPad->SetZoneConnection( PAD_ZONE_CONN_FULL );
|
||||
else
|
||||
m_currentPad->SetZoneConnection( PAD_ZONE_CONN_NONE );
|
||||
}
|
||||
else
|
||||
m_currentPad->SetZoneConnection( m_padMaster->GetZoneConnection() );
|
||||
|
||||
|
@ -1581,6 +1591,15 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
|
|||
break;
|
||||
}
|
||||
|
||||
// Custom shape has only 2 options:
|
||||
if( aPad->GetShape() == PAD_SHAPE_CUSTOM )
|
||||
{
|
||||
if( m_ZoneConnectionCustom->GetSelection() == 0 )
|
||||
aPad->SetZoneConnection( PAD_ZONE_CONN_NONE );
|
||||
else
|
||||
aPad->SetZoneConnection( PAD_ZONE_CONN_FULL );
|
||||
}
|
||||
|
||||
// Read pad position:
|
||||
x = ValueFromTextCtrl( *m_PadPosition_X_Ctrl );
|
||||
y = ValueFromTextCtrl( *m_PadPosition_Y_Ctrl );
|
||||
|
|
|
@ -546,8 +546,11 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
|||
m_staticTextCsZconnTitle->Wrap( -1 );
|
||||
fgSizerCustomShapedCopperZonesOpts->Add( m_staticTextCsZconnTitle, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
|
||||
|
||||
m_textCtrlNone = new wxTextCtrl( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, _("None"), wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
|
||||
fgSizerCustomShapedCopperZonesOpts->Add( m_textCtrlNone, 0, wxALL|wxEXPAND, 5 );
|
||||
wxString m_ZoneConnectionCustomChoices[] = { _("None"), _("Solid") };
|
||||
int m_ZoneConnectionCustomNChoices = sizeof( m_ZoneConnectionCustomChoices ) / sizeof( wxString );
|
||||
m_ZoneConnectionCustom = new wxChoice( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionCustomNChoices, m_ZoneConnectionCustomChoices, 0 );
|
||||
m_ZoneConnectionCustom->SetSelection( 0 );
|
||||
fgSizerCustomShapedCopperZonesOpts->Add( m_ZoneConnectionCustom, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_staticTextcps = new wxStaticText( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, _("Custom pad shape in zone:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextcps->Wrap( -1 );
|
||||
|
@ -557,7 +560,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
|||
int m_ZoneCustomPadShapeNChoices = sizeof( m_ZoneCustomPadShapeChoices ) / sizeof( wxString );
|
||||
m_ZoneCustomPadShape = new wxChoice( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneCustomPadShapeNChoices, m_ZoneCustomPadShapeChoices, 0 );
|
||||
m_ZoneCustomPadShape->SetSelection( 0 );
|
||||
fgSizerCustomShapedCopperZonesOpts->Add( m_ZoneCustomPadShape, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerCustomShapedCopperZonesOpts->Add( m_ZoneCustomPadShape, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_sbSizerCustomShapedZonesSettings->Add( fgSizerCustomShapedCopperZonesOpts, 0, wxEXPAND, 5 );
|
||||
|
|
|
@ -9158,11 +9158,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<object class="wxChoice" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -9176,6 +9176,7 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"None" "Solid"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
@ -9193,12 +9194,11 @@
|
|||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_textCtrlNone</property>
|
||||
<property name="name">m_ZoneConnectionCustom</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -9206,9 +9206,10 @@
|
|||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxTE_READONLY</property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
|
@ -9216,11 +9217,11 @@
|
|||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value">None</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnChoice"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -9242,10 +9243,6 @@
|
|||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -9334,7 +9331,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxChoice" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
|
|
@ -164,7 +164,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_ThermalGapUnits;
|
||||
wxStaticBoxSizer* m_sbSizerCustomShapedZonesSettings;
|
||||
wxStaticText* m_staticTextCsZconnTitle;
|
||||
wxTextCtrl* m_textCtrlNone;
|
||||
wxChoice* m_ZoneConnectionCustom;
|
||||
wxStaticText* m_staticTextcps;
|
||||
wxChoice* m_ZoneCustomPadShape;
|
||||
wxPanel* m_panelCustomShapePrimitives;
|
||||
|
|
|
@ -421,10 +421,11 @@ void ZONE_FILLER::buildZoneFeatureHoleList( const ZONE_CONTAINER* aZone,
|
|||
}
|
||||
|
||||
// Pads are removed from zone if the setup is PAD_ZONE_CONN_NONE
|
||||
// or if they have a custom shape, because a thermal relief will break
|
||||
// or if they have a custom shape and not PAD_ZONE_CONN_FULL,
|
||||
// because a thermal relief will break
|
||||
// the shape
|
||||
if( aZone->GetPadConnection( pad ) == PAD_ZONE_CONN_NONE
|
||||
|| pad->GetShape() == PAD_SHAPE_CUSTOM )
|
||||
|| ( pad->GetShape() == PAD_SHAPE_CUSTOM && aZone->GetPadConnection( pad ) != PAD_ZONE_CONN_FULL ) )
|
||||
{
|
||||
int gap = zone_clearance;
|
||||
int thermalGap = aZone->GetThermalReliefGap( pad );
|
||||
|
|
Loading…
Reference in New Issue