Split StyleFootprints into separate bools for fields vs text & graphics.
Also moves the settings from Board Setup to Preferences > PCB Editor. Also collapses Track Drag Mode from radio buttons to a choice menu to save space and allow it to be with the other editing action modes.
This commit is contained in:
parent
e43c8fcf6b
commit
8f5b7569d1
|
@ -621,12 +621,6 @@ public:
|
|||
bool GetTextItalic( PCB_LAYER_ID aLayer ) const;
|
||||
bool GetTextUpright( PCB_LAYER_ID aLayer ) const;
|
||||
|
||||
/**
|
||||
* Return whether footprint field text styles library values are overridden
|
||||
* with the board default settings for text/graphic items.
|
||||
*/
|
||||
bool GetStyleNewFootprints() const;
|
||||
|
||||
int GetLayerClass( PCB_LAYER_ID aLayer ) const;
|
||||
|
||||
void SetAuxOrigin( const VECTOR2I& aOrigin ) { m_auxOrigin = aOrigin; }
|
||||
|
@ -708,7 +702,6 @@ public:
|
|||
int m_TextThickness[ LAYER_CLASS_COUNT ];
|
||||
bool m_TextItalic[ LAYER_CLASS_COUNT ];
|
||||
bool m_TextUpright[ LAYER_CLASS_COUNT ];
|
||||
bool m_StyleFootprintFields;
|
||||
|
||||
// Default values for dimension objects
|
||||
DIM_UNITS_MODE m_DimensionUnitsMode;
|
||||
|
|
|
@ -116,8 +116,6 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
|
|||
m_TextItalic[ LAYER_CLASS_OTHERS ] = false;
|
||||
m_TextUpright[ LAYER_CLASS_OTHERS ] = false;
|
||||
|
||||
m_StyleFootprintFields = true;
|
||||
|
||||
m_DimensionPrecision = DIM_PRECISION::X_XXXX;
|
||||
m_DimensionUnitsMode = DIM_UNITS_MODE::AUTOMATIC;
|
||||
m_DimensionUnitsFormat = DIM_UNITS_FORMAT::BARE_SUFFIX;
|
||||
|
@ -695,9 +693,6 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
|
|||
m_params.emplace_back( new PARAM<bool>( "defaults.other_text_upright",
|
||||
&m_TextUpright[LAYER_CLASS_OTHERS], true ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "defaults.style_footprint_fields",
|
||||
&m_StyleFootprintFields, true ) );
|
||||
|
||||
m_params.emplace_back( new PARAM_ENUM<DIM_UNITS_MODE>( "defaults.dimension_units",
|
||||
&m_DimensionUnitsMode, DIM_UNITS_MODE::AUTOMATIC, DIM_UNITS_MODE::INCHES,
|
||||
DIM_UNITS_MODE::AUTOMATIC ) );
|
||||
|
@ -883,8 +878,6 @@ void BOARD_DESIGN_SETTINGS::initFromOther( const BOARD_DESIGN_SETTINGS& aOther )
|
|||
std::copy( std::begin( aOther.m_TextUpright ), std::end( aOther.m_TextUpright ),
|
||||
std::begin( m_TextUpright ) );
|
||||
|
||||
m_StyleFootprintFields = aOther.m_StyleFootprintFields;
|
||||
|
||||
m_DimensionUnitsMode = aOther.m_DimensionUnitsMode;
|
||||
m_DimensionPrecision = aOther.m_DimensionPrecision;
|
||||
m_DimensionUnitsFormat = aOther.m_DimensionUnitsFormat;
|
||||
|
@ -1296,9 +1289,3 @@ bool BOARD_DESIGN_SETTINGS::GetTextUpright( PCB_LAYER_ID aLayer ) const
|
|||
{
|
||||
return m_TextUpright[ GetLayerClass( aLayer ) ];
|
||||
}
|
||||
|
||||
|
||||
bool BOARD_DESIGN_SETTINGS::GetStyleNewFootprints() const
|
||||
{
|
||||
return m_StyleFootprintFields;
|
||||
}
|
||||
|
|
|
@ -61,39 +61,35 @@ PANEL_EDIT_OPTIONS::PANEL_EDIT_OPTIONS( wxWindow* aParent, UNITS_PROVIDER* aUnit
|
|||
|
||||
void PANEL_EDIT_OPTIONS::loadPCBSettings( PCBNEW_SETTINGS* aCfg )
|
||||
{
|
||||
m_cbConstrainHV45Mode->SetValue( aCfg->m_Use45DegreeLimit );
|
||||
m_rotationAngle.SetAngleValue( aCfg->m_RotationAngle );
|
||||
m_arcEditMode->SetSelection( (int) aCfg->m_ArcEditMode );
|
||||
m_trackMouseDragCtrl->SetSelection( (int) aCfg->m_TrackDragAction );
|
||||
m_flipLeftRight->SetValue( aCfg->m_FlipLeftRight );
|
||||
m_allowFreePads->SetValue( aCfg->m_AllowFreePads );
|
||||
m_autoRefillZones->SetValue( aCfg->m_AutoRefillZones );
|
||||
|
||||
m_magneticPadChoice->SetSelection( static_cast<int>( aCfg->m_MagneticItems.pads ) );
|
||||
m_magneticTrackChoice->SetSelection( static_cast<int>( aCfg->m_MagneticItems.tracks ) );
|
||||
m_magneticGraphicsChoice->SetSelection( !aCfg->m_MagneticItems.graphics );
|
||||
m_flipLeftRight->SetValue( aCfg->m_FlipLeftRight );
|
||||
m_cbConstrainHV45Mode->SetValue( aCfg->m_Use45DegreeLimit );
|
||||
m_cbCourtyardCollisions->SetValue( aCfg->m_ShowCourtyardCollisions );
|
||||
m_arcEditMode->SetSelection(
|
||||
aCfg->m_ArcEditMode == ARC_EDIT_MODE::KEEP_CENTER_ADJUST_ANGLE_RADIUS ? 0 : 1 );
|
||||
|
||||
/* Set display options */
|
||||
m_OptDisplayCurvedRatsnestLines->SetValue( aCfg->m_Display.m_DisplayRatsnestLinesCurved );
|
||||
m_showSelectedRatsnest->SetValue( aCfg->m_Display.m_ShowModuleRatsnest );
|
||||
m_ratsnestThickness->SetValue( aCfg->m_Display.m_RatsnestThickness );
|
||||
|
||||
switch( aCfg->m_TrackDragAction )
|
||||
{
|
||||
case TRACK_DRAG_ACTION::MOVE: m_rbTrackDragMove->SetValue( true ); break;
|
||||
case TRACK_DRAG_ACTION::DRAG: m_rbTrackDrag45->SetValue( true ); break;
|
||||
case TRACK_DRAG_ACTION::DRAG_FREE_ANGLE: m_rbTrackDragFree->SetValue( true ); break;
|
||||
}
|
||||
|
||||
#ifdef __WXOSX_MAC__
|
||||
m_rbCtrlClickActionMac->SetSelection( aCfg->m_CtrlClickHighlight );
|
||||
#else
|
||||
m_rbCtrlClickAction->SetSelection( aCfg->m_CtrlClickHighlight );
|
||||
#endif
|
||||
|
||||
m_showPageLimits->SetValue( aCfg->m_ShowPageLimits );
|
||||
m_autoRefillZones->SetValue( aCfg->m_AutoRefillZones );
|
||||
m_allowFreePads->SetValue( aCfg->m_AllowFreePads );
|
||||
|
||||
m_escClearsNetHighlight->SetValue( aCfg->m_ESCClearsNetHighlight );
|
||||
m_showPageLimits->SetValue( aCfg->m_ShowPageLimits );
|
||||
m_cbCourtyardCollisions->SetValue( aCfg->m_ShowCourtyardCollisions );
|
||||
|
||||
m_styleFields->SetValue( aCfg->m_StyleFootprintFields );
|
||||
m_styleTextAndGraphics->SetValue( aCfg->m_StyleFootprintTextAndGraphics );
|
||||
}
|
||||
|
||||
|
||||
|
@ -144,10 +140,7 @@ bool PANEL_EDIT_OPTIONS::TransferDataFromWindow()
|
|||
cfg->m_MagneticItems.graphics = m_magneticGraphics->GetValue();
|
||||
|
||||
cfg->m_Use45Limit = m_cbConstrainHV45Mode->GetValue();
|
||||
|
||||
cfg->m_ArcEditMode = m_arcEditMode->GetSelection() == 0
|
||||
? ARC_EDIT_MODE::KEEP_CENTER_ADJUST_ANGLE_RADIUS
|
||||
: ARC_EDIT_MODE::KEEP_ENDPOINTS_OR_START_DIRECTION;
|
||||
cfg->m_ArcEditMode = (ARC_EDIT_MODE) m_arcEditMode->GetSelection();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -157,37 +150,31 @@ bool PANEL_EDIT_OPTIONS::TransferDataFromWindow()
|
|||
cfg->m_Display.m_ShowModuleRatsnest = m_showSelectedRatsnest->GetValue();
|
||||
cfg->m_Display.m_RatsnestThickness = m_ratsnestThickness->GetValue();
|
||||
|
||||
cfg->m_Use45DegreeLimit = m_cbConstrainHV45Mode->GetValue();
|
||||
cfg->m_RotationAngle = m_rotationAngle.GetAngleValue();
|
||||
cfg->m_ArcEditMode = (ARC_EDIT_MODE) m_arcEditMode->GetSelection();
|
||||
cfg->m_TrackDragAction = (TRACK_DRAG_ACTION) m_trackMouseDragCtrl->GetSelection();
|
||||
cfg->m_FlipLeftRight = m_flipLeftRight->GetValue();
|
||||
cfg->m_AllowFreePads = m_allowFreePads->GetValue();
|
||||
cfg->m_AutoRefillZones = m_autoRefillZones->GetValue();
|
||||
|
||||
cfg->m_MagneticItems.pads = static_cast<MAGNETIC_OPTIONS>( m_magneticPadChoice->GetSelection() );
|
||||
cfg->m_MagneticItems.tracks = static_cast<MAGNETIC_OPTIONS>( m_magneticTrackChoice->GetSelection() );
|
||||
cfg->m_MagneticItems.graphics = !m_magneticGraphicsChoice->GetSelection();
|
||||
|
||||
cfg->m_FlipLeftRight = m_flipLeftRight->GetValue();
|
||||
cfg->m_ESCClearsNetHighlight = m_escClearsNetHighlight->GetValue();
|
||||
cfg->m_AutoRefillZones = m_autoRefillZones->GetValue();
|
||||
cfg->m_AllowFreePads = m_allowFreePads->GetValue();
|
||||
cfg->m_ShowPageLimits = m_showPageLimits->GetValue();
|
||||
cfg->m_ShowCourtyardCollisions = m_cbCourtyardCollisions->GetValue();
|
||||
|
||||
cfg->m_StyleFootprintFields = m_styleFields->GetValue();
|
||||
cfg->m_StyleFootprintTextAndGraphics = m_styleTextAndGraphics->GetValue();
|
||||
|
||||
if( m_rbTrackDragMove->GetValue() )
|
||||
cfg->m_TrackDragAction = TRACK_DRAG_ACTION::MOVE;
|
||||
else if( m_rbTrackDrag45->GetValue() )
|
||||
cfg->m_TrackDragAction = TRACK_DRAG_ACTION::DRAG;
|
||||
else if( m_rbTrackDragFree->GetValue() )
|
||||
cfg->m_TrackDragAction = TRACK_DRAG_ACTION::DRAG_FREE_ANGLE;
|
||||
|
||||
#ifdef __WXOSX_MAC__
|
||||
cfg->m_CtrlClickHighlight = m_rbCtrlClickActionMac->GetSelection();
|
||||
#else
|
||||
cfg->m_CtrlClickHighlight = m_rbCtrlClickAction->GetSelection();
|
||||
#endif
|
||||
|
||||
cfg->m_Use45DegreeLimit = m_cbConstrainHV45Mode->GetValue();
|
||||
cfg->m_ShowCourtyardCollisions = m_cbCourtyardCollisions->GetValue();
|
||||
|
||||
cfg->m_ArcEditMode = m_arcEditMode->GetSelection() == 0
|
||||
? ARC_EDIT_MODE::KEEP_CENTER_ADJUST_ANGLE_RADIUS
|
||||
: ARC_EDIT_MODE::KEEP_ENDPOINTS_OR_START_DIRECTION;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -23,27 +23,11 @@ PANEL_EDIT_OPTIONS_BASE::PANEL_EDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID i
|
|||
wxStaticBoxSizer* bOptionsSizer;
|
||||
bOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Editing Options") ), wxVERTICAL );
|
||||
|
||||
m_sizerBoardEdit = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_flipLeftRight = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Flip board items L/R (default is T/B)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_sizerBoardEdit->Add( m_flipLeftRight, 0, wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_allowFreePads = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Allow free pads"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_allowFreePads->SetToolTip( _("If checked, pads can be moved with respect to the rest of the footprint.") );
|
||||
|
||||
m_sizerBoardEdit->Add( m_allowFreePads, 0, wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_staticline3 = new wxStaticLine( bOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
m_sizerBoardEdit->Add( m_staticline3, 0, wxEXPAND|wxBOTTOM, 6 );
|
||||
|
||||
|
||||
bOptionsSizer->Add( m_sizerBoardEdit, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerUniversal;
|
||||
bSizerUniversal = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_cbConstrainHV45Mode = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Constrain actions to H, V, 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerUniversal->Add( m_cbConstrainHV45Mode, 0, wxBOTTOM|wxTOP|wxLEFT, 5 );
|
||||
bSizerUniversal->Add( m_cbConstrainHV45Mode, 0, wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerRotationStep;
|
||||
bSizerRotationStep = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
@ -65,33 +49,50 @@ PANEL_EDIT_OPTIONS_BASE::PANEL_EDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID i
|
|||
|
||||
bSizerUniversal->Add( bSizerRotationStep, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer101;
|
||||
bSizer101 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticline4 = new wxStaticLine( bOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bSizer101->Add( m_staticline4, 0, wxEXPAND|wxBOTTOM, 6 );
|
||||
|
||||
m_arcEditModeLabel = new wxStaticText( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Arc editing mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_arcEditModeLabel->Wrap( -1 );
|
||||
bSizer101->Add( m_arcEditModeLabel, 0, wxTOP|wxLEFT, 5 );
|
||||
bSizerUniversal->Add( m_arcEditModeLabel, 0, wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizer101->Add( 0, 3, 0, wxEXPAND, 5 );
|
||||
bSizerUniversal->Add( 0, 3, 0, wxEXPAND, 5 );
|
||||
|
||||
wxString m_arcEditModeChoices[] = { _("Keep center, adjust radius"), _("Keep endpoints or direction of starting point") };
|
||||
int m_arcEditModeNChoices = sizeof( m_arcEditModeChoices ) / sizeof( wxString );
|
||||
m_arcEditMode = new wxChoice( bOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_arcEditModeNChoices, m_arcEditModeChoices, 0 );
|
||||
m_arcEditMode->SetSelection( 0 );
|
||||
bSizer101->Add( m_arcEditMode, 0, wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerUniversal->Add( bSizer101, 1, wxEXPAND, 5 );
|
||||
bSizerUniversal->Add( m_arcEditMode, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bOptionsSizer->Add( bSizerUniversal, 0, wxEXPAND, 5 );
|
||||
|
||||
m_sizerBoardEdit = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
bMiddleLeftSizer->Add( bOptionsSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
m_trackMouseDragLabel = new wxStaticText( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Track mouse-drag mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_trackMouseDragLabel->Wrap( -1 );
|
||||
m_sizerBoardEdit->Add( m_trackMouseDragLabel, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_sizerBoardEdit->Add( 0, 3, 1, wxEXPAND, 5 );
|
||||
|
||||
wxString m_trackMouseDragCtrlChoices[] = { _("Move"), _("Drag (45 degree mode)"), _("Drag (free angle)") };
|
||||
int m_trackMouseDragCtrlNChoices = sizeof( m_trackMouseDragCtrlChoices ) / sizeof( wxString );
|
||||
m_trackMouseDragCtrl = new wxChoice( bOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trackMouseDragCtrlNChoices, m_trackMouseDragCtrlChoices, 0 );
|
||||
m_trackMouseDragCtrl->SetSelection( 0 );
|
||||
m_sizerBoardEdit->Add( m_trackMouseDragCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_flipLeftRight = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Flip board items L/R (default is T/B)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_sizerBoardEdit->Add( m_flipLeftRight, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_allowFreePads = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Allow free pads"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_allowFreePads->SetToolTip( _("If checked, pads can be moved with respect to the rest of the footprint.") );
|
||||
|
||||
m_sizerBoardEdit->Add( m_allowFreePads, 0, wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
|
||||
bOptionsSizer->Add( m_sizerBoardEdit, 0, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
|
||||
bMiddleLeftSizer->Add( bOptionsSizer, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_mouseCmdsWinLin = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Left Click Mouse Commands") ), wxVERTICAL );
|
||||
|
||||
|
@ -101,66 +102,66 @@ PANEL_EDIT_OPTIONS_BASE::PANEL_EDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID i
|
|||
|
||||
wxStaticLine* staticline11;
|
||||
staticline11 = new wxStaticLine( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
m_mouseCmdsWinLin->Add( staticline11, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
m_mouseCmdsWinLin->Add( staticline11, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizerCmdsWinLin;
|
||||
fgSizerCmdsWinLin = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
fgSizerCmdsWinLin = new wxFlexGridSizer( 0, 2, 8, 0 );
|
||||
fgSizerCmdsWinLin->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerCmdsWinLin->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
wxStaticText* staticText61;
|
||||
staticText61 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("No modifier"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText61 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Click"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText61->Wrap( -1 );
|
||||
fgSizerCmdsWinLin->Add( staticText61, 0, wxALL, 5 );
|
||||
fgSizerCmdsWinLin->Add( staticText61, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText71;
|
||||
staticText71 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Select item(s)."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText71->Wrap( -1 );
|
||||
fgSizerCmdsWinLin->Add( staticText71, 0, wxALL, 5 );
|
||||
fgSizerCmdsWinLin->Add( staticText71, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText611;
|
||||
staticText611 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Long Click"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText611->Wrap( -1 );
|
||||
fgSizerCmdsWinLin->Add( staticText611, 0, wxALL, 5 );
|
||||
fgSizerCmdsWinLin->Add( staticText611, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText711;
|
||||
staticText711 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Clarify selection from menu."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText711->Wrap( -1 );
|
||||
fgSizerCmdsWinLin->Add( staticText711, 0, wxALL, 5 );
|
||||
fgSizerCmdsWinLin->Add( staticText711, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText81;
|
||||
staticText81 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Shift"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText81->Wrap( -1 );
|
||||
fgSizerCmdsWinLin->Add( staticText81, 0, wxALL, 5 );
|
||||
fgSizerCmdsWinLin->Add( staticText81, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText91;
|
||||
staticText91 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Add item(s) to selection."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText91->Wrap( -1 );
|
||||
fgSizerCmdsWinLin->Add( staticText91, 0, wxALL, 5 );
|
||||
fgSizerCmdsWinLin->Add( staticText91, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText121;
|
||||
staticText121 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Ctrl+Shift"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText121->Wrap( -1 );
|
||||
fgSizerCmdsWinLin->Add( staticText121, 0, wxALL, 5 );
|
||||
fgSizerCmdsWinLin->Add( staticText121, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText131;
|
||||
staticText131 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Remove item(s) from selection."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText131->Wrap( -1 );
|
||||
fgSizerCmdsWinLin->Add( staticText131, 0, wxALL, 5 );
|
||||
fgSizerCmdsWinLin->Add( staticText131, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText161;
|
||||
staticText161 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Ctrl"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText161->Wrap( -1 );
|
||||
fgSizerCmdsWinLin->Add( staticText161, 0, wxALL, 5 );
|
||||
fgSizerCmdsWinLin->Add( staticText161, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxString m_rbCtrlClickActionChoices[] = { _("Toggle selection."), _("Highlight net (for pads or tracks).") };
|
||||
int m_rbCtrlClickActionNChoices = sizeof( m_rbCtrlClickActionChoices ) / sizeof( wxString );
|
||||
m_rbCtrlClickAction = new wxRadioBox( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, m_rbCtrlClickActionNChoices, m_rbCtrlClickActionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_rbCtrlClickAction = new wxRadioBox( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_rbCtrlClickActionNChoices, m_rbCtrlClickActionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_rbCtrlClickAction->SetSelection( 0 );
|
||||
fgSizerCmdsWinLin->Add( m_rbCtrlClickAction, 0, wxALL, 5 );
|
||||
fgSizerCmdsWinLin->Add( m_rbCtrlClickAction, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_mouseCmdsWinLin->Add( fgSizerCmdsWinLin, 1, wxEXPAND, 5 );
|
||||
m_mouseCmdsWinLin->Add( fgSizerCmdsWinLin, 1, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
|
||||
bMiddleLeftSizer->Add( m_mouseCmdsWinLin, 1, wxEXPAND|wxALL, 5 );
|
||||
|
@ -169,80 +170,80 @@ PANEL_EDIT_OPTIONS_BASE::PANEL_EDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID i
|
|||
|
||||
m_staticText1811 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Left click (and drag) actions depend on 3 modifier keys:\nOption, Shift and Cmd."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText1811->Wrap( -1 );
|
||||
m_mouseCmdsOSX->Add( m_staticText1811, 0, wxALL, 5 );
|
||||
m_mouseCmdsOSX->Add( m_staticText1811, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticLine* staticline111;
|
||||
staticline111 = new wxStaticLine( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
m_mouseCmdsOSX->Add( staticline111, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
m_mouseCmdsOSX->Add( staticline111, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizerCmdsOSX;
|
||||
fgSizerCmdsOSX = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
fgSizerCmdsOSX = new wxFlexGridSizer( 0, 2, 8, 0 );
|
||||
fgSizerCmdsOSX->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerCmdsOSX->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
wxStaticText* staticText62;
|
||||
staticText62 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("No modifier"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText62 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Click"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText62->Wrap( -1 );
|
||||
fgSizerCmdsOSX->Add( staticText62, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( staticText62, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText72;
|
||||
staticText72 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Select item(s)."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText72->Wrap( -1 );
|
||||
fgSizerCmdsOSX->Add( staticText72, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( staticText72, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText162;
|
||||
staticText162 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Long Click"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText162->Wrap( -1 );
|
||||
fgSizerCmdsOSX->Add( staticText162, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( staticText162, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText172;
|
||||
staticText172 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Clarify selection from menu."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText172->Wrap( -1 );
|
||||
fgSizerCmdsOSX->Add( staticText172, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( staticText172, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText82;
|
||||
staticText82 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Shift"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText82->Wrap( -1 );
|
||||
fgSizerCmdsOSX->Add( staticText82, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( staticText82, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText92;
|
||||
staticText92 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Add item(s) to selection."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText92->Wrap( -1 );
|
||||
fgSizerCmdsOSX->Add( staticText92, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( staticText92, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText122;
|
||||
staticText122 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Shift+Cmd"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText122->Wrap( -1 );
|
||||
fgSizerCmdsOSX->Add( staticText122, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( staticText122, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText132;
|
||||
staticText132 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Remove item(s) from selection."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText132->Wrap( -1 );
|
||||
fgSizerCmdsOSX->Add( staticText132, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( staticText132, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText142;
|
||||
staticText142 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Cmd"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText142->Wrap( -1 );
|
||||
fgSizerCmdsOSX->Add( staticText142, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( staticText142, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxString m_rbCtrlClickActionMacChoices[] = { _("Toggle selection."), _("Highlight net (for pads or tracks).") };
|
||||
int m_rbCtrlClickActionMacNChoices = sizeof( m_rbCtrlClickActionMacChoices ) / sizeof( wxString );
|
||||
m_rbCtrlClickActionMac = new wxRadioBox( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, m_rbCtrlClickActionMacNChoices, m_rbCtrlClickActionMacChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_rbCtrlClickActionMac = new wxRadioBox( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_rbCtrlClickActionMacNChoices, m_rbCtrlClickActionMacChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_rbCtrlClickActionMac->SetSelection( 0 );
|
||||
fgSizerCmdsOSX->Add( m_rbCtrlClickActionMac, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( m_rbCtrlClickActionMac, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText102;
|
||||
staticText102 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Option"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText102->Wrap( -1 );
|
||||
fgSizerCmdsOSX->Add( staticText102, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( staticText102, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* staticText112;
|
||||
staticText112 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Clarify selection from menu."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticText112->Wrap( -1 );
|
||||
fgSizerCmdsOSX->Add( staticText112, 0, wxALL, 5 );
|
||||
fgSizerCmdsOSX->Add( staticText112, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_mouseCmdsOSX->Add( fgSizerCmdsOSX, 1, wxEXPAND, 5 );
|
||||
m_mouseCmdsOSX->Add( fgSizerCmdsOSX, 1, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
|
||||
bMiddleLeftSizer->Add( m_mouseCmdsOSX, 1, wxEXPAND|wxALL, 5 );
|
||||
|
@ -283,7 +284,7 @@ PANEL_EDIT_OPTIONS_BASE::PANEL_EDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID i
|
|||
sbMagnets = new wxStaticBoxSizer( new wxStaticBox( pcbPage, wxID_ANY, _("Magnetic Points") ), wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer2;
|
||||
fgSizer2 = new wxFlexGridSizer( 0, 2, 3, 0 );
|
||||
fgSizer2 = new wxFlexGridSizer( 0, 2, 5, 0 );
|
||||
fgSizer2->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
@ -333,7 +334,7 @@ PANEL_EDIT_OPTIONS_BASE::PANEL_EDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID i
|
|||
sbMagnets->Add( fgSizer2, 1, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
pcbOptionsSizer->Add( sbMagnets, 0, wxEXPAND|wxTOP, 5 );
|
||||
pcbOptionsSizer->Add( sbMagnets, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer3;
|
||||
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( pcbPage, wxID_ANY, _("Ratsnest") ), wxVERTICAL );
|
||||
|
@ -359,40 +360,7 @@ PANEL_EDIT_OPTIONS_BASE::PANEL_EDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID i
|
|||
sbSizer3->Add( bSizer11, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
pcbOptionsSizer->Add( sbSizer3, 0, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer41;
|
||||
sbSizer41 = new wxStaticBoxSizer( new wxStaticBox( pcbPage, wxID_ANY, _("Track Editing") ), wxVERTICAL );
|
||||
|
||||
m_staticText5 = new wxStaticText( sbSizer41->GetStaticBox(), wxID_ANY, _("Mouse drag track behavior:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText5->Wrap( -1 );
|
||||
m_staticText5->SetToolTip( _("Choose the action to perform when dragging a track segment with the mouse") );
|
||||
|
||||
sbSizer41->Add( m_staticText5, 0, wxBOTTOM|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
wxBoxSizer* bSizer8;
|
||||
bSizer8 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_rbTrackDragMove = new wxRadioButton( sbSizer41->GetStaticBox(), wxID_ANY, _("Move"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
||||
m_rbTrackDragMove->SetToolTip( _("Moves the track segment without moving connected tracks") );
|
||||
|
||||
bSizer8->Add( m_rbTrackDragMove, 0, wxBOTTOM, 3 );
|
||||
|
||||
m_rbTrackDrag45 = new wxRadioButton( sbSizer41->GetStaticBox(), wxID_ANY, _("Drag (45 degree mode)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_rbTrackDrag45->SetToolTip( _("Drags the track segment while keeping connected tracks at 45 degrees.") );
|
||||
|
||||
bSizer8->Add( m_rbTrackDrag45, 0, wxBOTTOM, 3 );
|
||||
|
||||
m_rbTrackDragFree = new wxRadioButton( sbSizer41->GetStaticBox(), wxID_ANY, _("Drag (free angle)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_rbTrackDragFree->SetToolTip( _("Drags the nearest joint in the track without restricting the track angle.") );
|
||||
|
||||
bSizer8->Add( m_rbTrackDragFree, 0, 0, 3 );
|
||||
|
||||
|
||||
sbSizer41->Add( bSizer8, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
pcbOptionsSizer->Add( sbSizer41, 0, wxEXPAND|wxTOP, 5 );
|
||||
pcbOptionsSizer->Add( sbSizer3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerMisc;
|
||||
sbSizerMisc = new wxStaticBoxSizer( new wxStaticBox( pcbPage, wxID_ANY, _("Miscellaneous") ), wxVERTICAL );
|
||||
|
@ -418,7 +386,19 @@ PANEL_EDIT_OPTIONS_BASE::PANEL_EDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID i
|
|||
sbSizerMisc->Add( m_autoRefillZones, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
pcbOptionsSizer->Add( sbSizerMisc, 0, wxEXPAND|wxTOP, 5 );
|
||||
pcbOptionsSizer->Add( sbSizerMisc, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer2;
|
||||
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( pcbPage, wxID_ANY, _("When Adding Footprints to PCB") ), wxVERTICAL );
|
||||
|
||||
m_styleFields = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Apply board defaults to footprint fields"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer2->Add( m_styleFields, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_styleTextAndGraphics = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Apply board defaults to footprint text && graphics"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer2->Add( m_styleTextAndGraphics, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
pcbOptionsSizer->Add( sbSizer2, 1, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
|
||||
pcbPage->SetSizer( pcbOptionsSizer );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,16 +17,15 @@
|
|||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/simplebook.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -39,17 +38,17 @@ class PANEL_EDIT_OPTIONS_BASE : public RESETTABLE_PANEL
|
|||
private:
|
||||
|
||||
protected:
|
||||
wxBoxSizer* m_sizerBoardEdit;
|
||||
wxCheckBox* m_flipLeftRight;
|
||||
wxCheckBox* m_allowFreePads;
|
||||
wxStaticLine* m_staticline3;
|
||||
wxCheckBox* m_cbConstrainHV45Mode;
|
||||
wxStaticText* m_rotationAngleLabel;
|
||||
wxTextCtrl* m_rotationAngleCtrl;
|
||||
wxStaticText* m_rotationAngleUnits;
|
||||
wxStaticLine* m_staticline4;
|
||||
wxStaticText* m_arcEditModeLabel;
|
||||
wxChoice* m_arcEditMode;
|
||||
wxBoxSizer* m_sizerBoardEdit;
|
||||
wxStaticText* m_trackMouseDragLabel;
|
||||
wxChoice* m_trackMouseDragCtrl;
|
||||
wxCheckBox* m_flipLeftRight;
|
||||
wxCheckBox* m_allowFreePads;
|
||||
wxStaticBoxSizer* m_mouseCmdsWinLin;
|
||||
wxStaticText* m_staticText181;
|
||||
wxRadioBox* m_rbCtrlClickAction;
|
||||
|
@ -69,14 +68,12 @@ class PANEL_EDIT_OPTIONS_BASE : public RESETTABLE_PANEL
|
|||
wxCheckBox* m_OptDisplayCurvedRatsnestLines;
|
||||
wxStaticText* m_ratsnestThicknessLabel;
|
||||
wxSpinCtrlDouble* m_ratsnestThickness;
|
||||
wxStaticText* m_staticText5;
|
||||
wxRadioButton* m_rbTrackDragMove;
|
||||
wxRadioButton* m_rbTrackDrag45;
|
||||
wxRadioButton* m_rbTrackDragFree;
|
||||
wxCheckBox* m_escClearsNetHighlight;
|
||||
wxCheckBox* m_showPageLimits;
|
||||
wxCheckBox* m_cbCourtyardCollisions;
|
||||
wxCheckBox* m_autoRefillZones;
|
||||
wxCheckBox* m_styleFields;
|
||||
wxCheckBox* m_styleTextAndGraphics;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -50,6 +50,24 @@ PANEL_SETUP_FORMATTING_BASE::PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWi
|
|||
bMargins->Add( sbSizer6, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bMargins->Add( 0, 10, 0, wxEXPAND, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer2;
|
||||
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Format Footrpints when Added to Board") ), wxVERTICAL );
|
||||
|
||||
m_styleFields = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Apply board defaults to footprint fields"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer2->Add( m_styleFields, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_styleText = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Apply board defaults to footprint text"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer2->Add( m_styleText, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_styleGrahics = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Apply board defaults to footprint graphics"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer2->Add( m_styleGrahics, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bMargins->Add( sbSizer2, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bMargins, 1, wxEXPAND|wxTOP|wxRIGHT, 5 );
|
||||
|
||||
|
||||
|
|
|
@ -409,6 +409,222 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">10</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Format Footrpints when Added to Board</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbSizer2</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Apply board defaults to footprint fields</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></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_styleFields</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Apply board defaults to footprint text</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></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_styleText</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Apply board defaults to footprint graphics</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></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_styleGrahics</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <wx/textctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -37,6 +38,9 @@ class PANEL_SETUP_FORMATTING_BASE : public wxPanel
|
|||
wxStaticText* gapLengthLabel;
|
||||
wxTextCtrl* m_gapLengthCtrl;
|
||||
wxStaticText* m_dashedLineHelp;
|
||||
wxCheckBox* m_styleFields;
|
||||
wxCheckBox* m_styleText;
|
||||
wxCheckBox* m_styleGrahics;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -170,8 +170,6 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataToWindow()
|
|||
}
|
||||
}
|
||||
|
||||
m_styleFootprintFields->SetValue( m_BrdSettings->m_StyleFootprintFields );
|
||||
|
||||
// Work around an issue where wxWidgets doesn't calculate the row width on its own
|
||||
for( int col = 0; col < m_grid->GetNumberCols(); col++ )
|
||||
m_grid->SetColMinimalWidth( col, m_grid->GetVisibleWidth( col ) );
|
||||
|
@ -217,8 +215,6 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow()
|
|||
wxGridCellBoolEditor::IsTrueValue( m_grid->GetCellValue( i, COL_TEXT_UPRIGHT ) );
|
||||
}
|
||||
|
||||
m_BrdSettings->m_StyleFootprintFields = m_styleFootprintFields->GetValue();
|
||||
|
||||
// These are all stored in project file, not board, so no need for OnModify()
|
||||
|
||||
int mode = m_dimensionUnits->GetSelection();
|
||||
|
|
|
@ -72,12 +72,6 @@ PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow
|
|||
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
||||
m_gridSizer->Add( m_grid, 0, wxBOTTOM, 15 );
|
||||
|
||||
m_styleFootprintFields = new wxCheckBox( this, wxID_ANY, _("Apply default properties to graphics and text in new footprints"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_styleFootprintFields->SetValue(true);
|
||||
m_styleFootprintFields->SetToolTip( _("When checked, the default text style of footprint fields will be overridden by the board settings") );
|
||||
|
||||
m_gridSizer->Add( m_styleFootprintFields, 0, wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
|
||||
m_gridSizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
|
|
|
@ -283,70 +283,6 @@
|
|||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">1</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Apply default properties to graphics and text in new footprints</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></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_styleFootprintFields</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">When checked, the default text style of footprint fields will be overridden by the board settings</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
|
|
|
@ -20,8 +20,8 @@ class WX_GRID;
|
|||
#include <wx/settings.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/grid.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/sizer.h>
|
||||
|
@ -41,7 +41,6 @@ class PANEL_SETUP_TEXT_AND_GRAPHICS_BASE : public wxPanel
|
|||
wxStaticText* m_staticTextDefProp;
|
||||
wxStaticLine* m_staticline11;
|
||||
WX_GRID* m_grid;
|
||||
wxCheckBox* m_styleFootprintFields;
|
||||
wxStaticText* m_staticTextDefPropDim;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxStaticText* m_lblDimensionUnits;
|
||||
|
|
|
@ -83,10 +83,6 @@ FOOTPRINT::FOOTPRINT( BOARD* parent ) :
|
|||
PCB_FIELD* field = new PCB_FIELD( this, i );
|
||||
m_fields.push_back( field );
|
||||
|
||||
// Style according to the board settings if we have them
|
||||
if( parent )
|
||||
ApplyDefaultSettings( *parent );
|
||||
|
||||
switch( i )
|
||||
{
|
||||
case REFERENCE_FIELD:
|
||||
|
@ -356,13 +352,20 @@ void FOOTPRINT::RemoveField( const wxString& aFieldName )
|
|||
}
|
||||
|
||||
|
||||
void FOOTPRINT::ApplyDefaultSettings( BOARD& board )
|
||||
void FOOTPRINT::ApplyDefaultSettings( const BOARD& board, bool aStyleFields,
|
||||
bool aStyleTextAndGraphics )
|
||||
{
|
||||
for( PCB_FIELD* field : m_fields )
|
||||
field->StyleFromSettings( board.GetDesignSettings() );
|
||||
if( aStyleFields )
|
||||
{
|
||||
for( PCB_FIELD* field : m_fields )
|
||||
field->StyleFromSettings( board.GetDesignSettings() );
|
||||
}
|
||||
|
||||
for( BOARD_ITEM* item : m_drawings )
|
||||
item->StyleFromSettings( board.GetDesignSettings() );
|
||||
if( aStyleTextAndGraphics )
|
||||
{
|
||||
for( BOARD_ITEM* item : m_drawings )
|
||||
item->StyleFromSettings( board.GetDesignSettings() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -655,7 +655,7 @@ public:
|
|||
* being created in the footprint library cache, and we want these fields to have
|
||||
* the correct default text properties.
|
||||
*/
|
||||
void ApplyDefaultSettings( BOARD& board );
|
||||
void ApplyDefaultSettings( const BOARD& board, bool aStyleFields, bool aStyleTextAndGraphics );
|
||||
|
||||
bool IsBoardOnly() const { return m_attributes & FP_BOARD_ONLY; }
|
||||
void SetBoardOnly( bool aIsBoardOnly = true )
|
||||
|
|
|
@ -356,10 +356,10 @@ FOOTPRINT* PCB_BASE_FRAME::loadFootprint( const LIB_ID& aFootprintId )
|
|||
// any netinfo list (should be not needed, but it can be edited from the footprint editor )
|
||||
footprint->ClearAllNets();
|
||||
|
||||
if( m_pcb && !m_pcb->IsFootprintHolder()
|
||||
&& m_pcb->GetDesignSettings().GetStyleNewFootprints() )
|
||||
if( m_pcb && !m_pcb->IsFootprintHolder() )
|
||||
{
|
||||
footprint->ApplyDefaultSettings( *m_pcb );
|
||||
footprint->ApplyDefaultSettings( *m_pcb, GetPcbNewSettings()->m_StyleFootprintFields,
|
||||
GetPcbNewSettings()->m_StyleFootprintTextAndGraphics );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,6 +78,8 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
|
|||
m_ShowCourtyardCollisions( true ),
|
||||
m_AutoRefillZones( false ),
|
||||
m_AllowFreePads( false ),
|
||||
m_StyleFootprintFields( false ),
|
||||
m_StyleFootprintTextAndGraphics( false ),
|
||||
m_PnsSettings( nullptr ),
|
||||
m_FootprintViewerZoom( 1.0 ),
|
||||
m_FootprintViewerAutoZoomOnSelect( true ),
|
||||
|
@ -182,6 +184,11 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
|
|||
m_params.emplace_back( new PARAM<bool>( "editing.allow_free_pads",
|
||||
&m_AllowFreePads, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "editing.style_footprint_fields",
|
||||
&m_StyleFootprintFields, false ) );
|
||||
m_params.emplace_back( new PARAM<bool>( "editing.style_footprint_text_and_graphics",
|
||||
&m_StyleFootprintTextAndGraphics, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM_LAMBDA<int>( "editing.rotation_angle",
|
||||
[this] () -> int
|
||||
{
|
||||
|
|
|
@ -406,6 +406,9 @@ public:
|
|||
// False (default): all pads are treated as locked for the purposes of
|
||||
// movement and any attempt to move them will move the footprint instead.
|
||||
|
||||
bool m_StyleFootprintFields;
|
||||
bool m_StyleFootprintTextAndGraphics;
|
||||
|
||||
wxString m_FootprintTextShownColumns;
|
||||
|
||||
std::unique_ptr<PNS::ROUTING_SETTINGS> m_PnsSettings;
|
||||
|
|
Loading…
Reference in New Issue