Expose extension offset and zero suppression settings
This commit is contained in:
parent
1703657fb5
commit
3940e20fcb
|
@ -50,6 +50,7 @@
|
|||
#define DEFAULT_TEXT_WIDTH 0.15
|
||||
|
||||
#define DEFAULT_DIMENSION_ARROW_LENGTH 50 // mils, for legacy purposes
|
||||
#define DEFAULT_DIMENSION_EXTENSION_OFFSET 0.5
|
||||
|
||||
// Board thickness, mainly for 3D view:
|
||||
#define DEFAULT_BOARD_THICKNESS_MM 1.6
|
||||
|
@ -280,9 +281,11 @@ public:
|
|||
DIM_UNITS_MODE m_DimensionUnitsMode;
|
||||
int m_DimensionPrecision; ///< Number of digits after the decimal
|
||||
DIM_UNITS_FORMAT m_DimensionUnitsFormat;
|
||||
bool m_DimensionSuppressZeroes;
|
||||
DIM_TEXT_POSITION m_DimensionTextPosition;
|
||||
bool m_DimensionKeepTextAligned;
|
||||
int m_DimensionArrowLength;
|
||||
int m_DimensionExtensionOffset;
|
||||
|
||||
// Miscellaneous
|
||||
wxPoint m_AuxOrigin; ///< origin for plot exports
|
||||
|
|
|
@ -122,9 +122,11 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
|
|||
m_DimensionPrecision = 4;
|
||||
m_DimensionUnitsMode = DIM_UNITS_MODE::AUTOMATIC;
|
||||
m_DimensionUnitsFormat = DIM_UNITS_FORMAT::BARE_SUFFIX;
|
||||
m_DimensionSuppressZeroes = false;
|
||||
m_DimensionTextPosition = DIM_TEXT_POSITION::OUTSIDE;
|
||||
m_DimensionKeepTextAligned = true;
|
||||
m_DimensionArrowLength = Mils2iu( DEFAULT_DIMENSION_ARROW_LENGTH );
|
||||
m_DimensionExtensionOffset = Millimeter2iu( DEFAULT_DIMENSION_EXTENSION_OFFSET );
|
||||
|
||||
m_useCustomTrackVia = false;
|
||||
m_customTrackWidth = Millimeter2iu( DEFAULT_CUSTOMTRACKWIDTH );
|
||||
|
@ -526,6 +528,9 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
|
|||
&m_DimensionUnitsFormat, DIM_UNITS_FORMAT::BARE_SUFFIX, DIM_UNITS_FORMAT::NO_SUFFIX,
|
||||
DIM_UNITS_FORMAT::PAREN_SUFFIX ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "defaults.dimensions.suppress_zeroes",
|
||||
&m_DimensionSuppressZeroes, false ) );
|
||||
|
||||
// NOTE: excluding DIM_TEXT_POSITION::MANUAL from the valid range here
|
||||
m_params.emplace_back( new PARAM_ENUM<DIM_TEXT_POSITION>( "defaults.dimensions.text_position",
|
||||
&m_DimensionTextPosition, DIM_TEXT_POSITION::OUTSIDE, DIM_TEXT_POSITION::OUTSIDE,
|
||||
|
@ -538,6 +543,10 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
|
|||
&m_DimensionArrowLength,
|
||||
Mils2iu( DEFAULT_DIMENSION_ARROW_LENGTH ) ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<int>( "defaults.dimensions.extension_offset",
|
||||
&m_DimensionExtensionOffset,
|
||||
Millimeter2iu( DEFAULT_DIMENSION_EXTENSION_OFFSET ) ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "defaults.zones.45_degree_only",
|
||||
&m_defaultZoneSettings.m_Zone_45_Only, false ) );
|
||||
|
||||
|
@ -660,9 +669,11 @@ void BOARD_DESIGN_SETTINGS::initFromOther( const BOARD_DESIGN_SETTINGS& aOther )
|
|||
m_DimensionUnitsMode = aOther.m_DimensionUnitsMode;
|
||||
m_DimensionPrecision = aOther.m_DimensionPrecision;
|
||||
m_DimensionUnitsFormat = aOther.m_DimensionUnitsFormat;
|
||||
m_DimensionSuppressZeroes = aOther.m_DimensionSuppressZeroes;
|
||||
m_DimensionTextPosition = aOther.m_DimensionTextPosition;
|
||||
m_DimensionKeepTextAligned = aOther.m_DimensionKeepTextAligned;
|
||||
m_DimensionArrowLength = aOther.m_DimensionArrowLength;
|
||||
m_DimensionExtensionOffset = aOther.m_DimensionExtensionOffset;
|
||||
|
||||
m_AuxOrigin = aOther.m_AuxOrigin;
|
||||
m_GridOrigin = aOther.m_GridOrigin;
|
||||
|
|
|
@ -41,7 +41,9 @@ DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES( PCB_BASE_EDIT_FRAME* a
|
|||
m_orientValidator( 1, &m_orientValue ),
|
||||
m_lineThickness( aParent, m_lblLineThickness, m_txtLineThickness,
|
||||
m_lblLineThicknessUnits, true ),
|
||||
m_arrowLength( aParent, m_lblArrowLength, m_txtArrowLength, m_lblArrowLengthUnits, true )
|
||||
m_arrowLength( aParent, m_lblArrowLength, m_txtArrowLength, m_lblArrowLengthUnits, true ),
|
||||
m_extensionOffset( aParent, m_lblExtensionOffset, m_txtExtensionOffset,
|
||||
m_lblExtensionOffsetUnits )
|
||||
{
|
||||
wxASSERT( aItem->Type() == PCB_DIMENSION_T );
|
||||
m_dimension = static_cast<DIMENSION*>( aItem );
|
||||
|
@ -182,6 +184,7 @@ bool DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow()
|
|||
|
||||
m_lineThickness.SetValue( m_dimension->GetLineThickness() );
|
||||
m_arrowLength.SetValue( m_dimension->GetArrowLength() );
|
||||
m_extensionOffset.SetValue( m_dimension->GetExtensionOffset() );
|
||||
|
||||
// Do this last; it depends on the other settings
|
||||
if( m_dimension->GetOverrideTextEnabled() )
|
||||
|
@ -266,6 +269,7 @@ void DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog( DIMENSION* aTarget
|
|||
|
||||
aTarget->SetLineThickness( m_lineThickness.GetValue() );
|
||||
aTarget->SetArrowLength( m_arrowLength.GetValue() );
|
||||
aTarget->SetExtensionOffset( m_extensionOffset.GetValue() );
|
||||
|
||||
aTarget->Update();
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ private:
|
|||
|
||||
UNIT_BINDER m_lineThickness;
|
||||
UNIT_BINDER m_arrowLength;
|
||||
UNIT_BINDER m_extensionOffset;
|
||||
|
||||
void updateDimensionFromDialog( DIMENSION* aTarget );
|
||||
|
||||
|
|
|
@ -311,6 +311,21 @@ DIALOG_DIMENSION_PROPERTIES_BASE::DIALOG_DIMENSION_PROPERTIES_BASE( wxWindow* pa
|
|||
m_lblArrowLengthUnits->Wrap( -1 );
|
||||
gbSizerLine->Add( m_lblArrowLengthUnits, wxGBPosition( 0, 6 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_lblExtensionOffset = new wxStaticText( sbSizerLine->GetStaticBox(), wxID_ANY, _("Extension line offset:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lblExtensionOffset->Wrap( -1 );
|
||||
m_lblExtensionOffset->SetToolTip( _("Gap between the measured points and the start of the extension lines") );
|
||||
|
||||
gbSizerLine->Add( m_lblExtensionOffset, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_txtExtensionOffset = new wxTextCtrl( sbSizerLine->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_txtExtensionOffset->SetToolTip( _("Gap between the measured points and the start of the extension lines") );
|
||||
|
||||
gbSizerLine->Add( m_txtExtensionOffset, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
|
||||
|
||||
m_lblExtensionOffsetUnits = new wxStaticText( sbSizerLine->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lblExtensionOffsetUnits->Wrap( -1 );
|
||||
gbSizerLine->Add( m_lblExtensionOffsetUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALL, 5 );
|
||||
|
||||
|
||||
gbSizerLine->AddGrowableCol( 1 );
|
||||
gbSizerLine->AddGrowableCol( 3 );
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="name">DIALOG_DIMENSION_PROPERTIES_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">654,655</property>
|
||||
<property name="size">654,757</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
|
||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||
<property name="title">Dimension Properties</property>
|
||||
|
@ -3335,6 +3335,201 @@
|
|||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="row">1</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" 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="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">Extension line offset:</property>
|
||||
<property name="markup">0</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_lblExtensionOffset</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">Gap between the measured points and the start of the extension lines</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">1</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="row">1</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxTextCtrl" 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="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="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_txtExtensionOffset</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">Gap between the measured points and the start of the extension lines</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="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">2</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="row">1</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" 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="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">unit</property>
|
||||
<property name="markup">0</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_lblExtensionOffsetUnits</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="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -90,6 +90,9 @@ class DIALOG_DIMENSION_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_lblArrowLength;
|
||||
wxTextCtrl* m_txtArrowLength;
|
||||
wxStaticText* m_lblArrowLengthUnits;
|
||||
wxStaticText* m_lblExtensionOffset;
|
||||
wxTextCtrl* m_txtExtensionOffset;
|
||||
wxStaticText* m_lblExtensionOffsetUnits;
|
||||
wxStaticLine* m_staticline;
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
|
@ -103,7 +106,7 @@ class DIALOG_DIMENSION_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
|
||||
public:
|
||||
|
||||
DIALOG_DIMENSION_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Dimension Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 654,655 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
||||
DIALOG_DIMENSION_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Dimension Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 654,757 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
||||
~DIALOG_DIMENSION_PROPERTIES_BASE();
|
||||
|
||||
};
|
||||
|
|
|
@ -57,7 +57,9 @@ enum
|
|||
PANEL_SETUP_TEXT_AND_GRAPHICS::PANEL_SETUP_TEXT_AND_GRAPHICS( PAGED_DIALOG* aParent,
|
||||
PCB_EDIT_FRAME* aFrame ) :
|
||||
PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( aParent->GetTreebook() ),
|
||||
m_arrowLength( aFrame, m_lblArrowLength, m_dimensionArrowLength, m_arrowLengthUnits )
|
||||
m_arrowLength( aFrame, m_lblArrowLength, m_dimensionArrowLength, m_arrowLengthUnits ),
|
||||
m_extensionOffset( aFrame, m_lblExtensionOffset, m_dimensionExtensionOffset,
|
||||
m_dimensionExtensionOffsetUnits )
|
||||
{
|
||||
m_Parent = aParent;
|
||||
m_Frame = aFrame;
|
||||
|
@ -142,12 +144,14 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataToWindow()
|
|||
m_dimensionUnitsFormat->SetSelection( format );
|
||||
|
||||
m_dimensionPrecision->SetSelection( m_BrdSettings->m_DimensionPrecision );
|
||||
m_dimensionSuppressZeroes->SetValue( m_BrdSettings->m_DimensionSuppressZeroes );
|
||||
|
||||
int position = static_cast<int>( m_BrdSettings->m_DimensionTextPosition );
|
||||
m_dimensionTextPositionMode->SetSelection( position );
|
||||
|
||||
m_dimensionTextKeepAligned->SetValue( m_BrdSettings->m_DimensionKeepTextAligned );
|
||||
m_arrowLength.SetValue( m_BrdSettings->m_DimensionArrowLength );
|
||||
m_extensionOffset.SetValue( m_BrdSettings->m_DimensionExtensionOffset );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -209,10 +213,12 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow()
|
|||
int format = m_dimensionUnitsFormat->GetSelection();
|
||||
m_BrdSettings->m_DimensionUnitsFormat = static_cast<DIM_UNITS_FORMAT>( format );
|
||||
m_BrdSettings->m_DimensionPrecision = m_dimensionPrecision->GetSelection();
|
||||
m_BrdSettings->m_DimensionSuppressZeroes = m_dimensionSuppressZeroes->GetValue();
|
||||
int position = m_dimensionTextPositionMode->GetSelection();
|
||||
m_BrdSettings->m_DimensionTextPosition = static_cast<DIM_TEXT_POSITION>( position );
|
||||
m_BrdSettings->m_DimensionKeepTextAligned = m_dimensionTextKeepAligned->GetValue();
|
||||
m_BrdSettings->m_DimensionArrowLength = m_arrowLength.GetValue();
|
||||
m_BrdSettings->m_DimensionExtensionOffset = m_extensionOffset.GetValue();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ private:
|
|||
PCB_EDIT_FRAME* m_Frame;
|
||||
BOARD_DESIGN_SETTINGS* m_BrdSettings;
|
||||
UNIT_BINDER m_arrowLength;
|
||||
UNIT_BINDER m_extensionOffset;
|
||||
|
||||
private:
|
||||
bool validateData();
|
||||
|
|
|
@ -93,7 +93,7 @@ PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow
|
|||
gbSizer1->Add( m_dimensionUnits, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
gbSizer1->Add( 40, 0, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
|
||||
gbSizer1->Add( 100, 0, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
|
||||
|
||||
m_lblTextPositionMode = new wxStaticText( this, wxID_ANY, _("Text position:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lblTextPositionMode->Wrap( -1 );
|
||||
|
@ -145,6 +145,22 @@ PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow
|
|||
m_arrowLengthUnits->Wrap( -1 );
|
||||
gbSizer1->Add( m_arrowLengthUnits, wxGBPosition( 2, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_dimensionSuppressZeroes = new wxCheckBox( this, wxID_ANY, _("Suppress trailing zeroes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_dimensionSuppressZeroes->SetToolTip( _("When checked, \"1.2300\" will be rendered as \"1.23\" even if precision is set to show more digits") );
|
||||
|
||||
gbSizer1->Add( m_dimensionSuppressZeroes, wxGBPosition( 3, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_lblExtensionOffset = new wxStaticText( this, wxID_ANY, _("Extension line offset:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lblExtensionOffset->Wrap( -1 );
|
||||
gbSizer1->Add( m_lblExtensionOffset, wxGBPosition( 3, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_dimensionExtensionOffset = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_dimensionExtensionOffset, wxGBPosition( 3, 4 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_dimensionExtensionOffsetUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_dimensionExtensionOffsetUnits->Wrap( -1 );
|
||||
gbSizer1->Add( m_dimensionExtensionOffsetUnits, wxGBPosition( 3, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
|
||||
m_gridSizer->Add( gbSizer1, 1, wxBOTTOM|wxEXPAND|wxLEFT, 20 );
|
||||
|
||||
|
|
|
@ -439,7 +439,7 @@
|
|||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">40</property>
|
||||
<property name="width">100</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
|
@ -1097,6 +1097,268 @@
|
|||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">2</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="row">3</property>
|
||||
<property name="rowspan">1</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">Suppress trailing zeroes</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_dimensionSuppressZeroes</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, "1.2300" will be rendered as "1.23" even if precision is set to show more digits</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="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="row">3</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" 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="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">Extension line offset:</property>
|
||||
<property name="markup">0</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_lblExtensionOffset</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="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">4</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="row">3</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxTextCtrl" 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="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="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_dimensionExtensionOffset</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="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="row">3</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" 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="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">unit</property>
|
||||
<property name="markup">0</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_dimensionExtensionOffsetUnits</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="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -52,6 +52,10 @@ class PANEL_SETUP_TEXT_AND_GRAPHICS_BASE : public wxPanel
|
|||
wxStaticText* m_lblArrowLength;
|
||||
wxTextCtrl* m_dimensionArrowLength;
|
||||
wxStaticText* m_arrowLengthUnits;
|
||||
wxCheckBox* m_dimensionSuppressZeroes;
|
||||
wxStaticText* m_lblExtensionOffset;
|
||||
wxTextCtrl* m_dimensionExtensionOffset;
|
||||
wxStaticText* m_dimensionExtensionOffsetUnits;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -709,7 +709,7 @@ void PCB_IO::format( ALIGNED_DIMENSION* aDimension, int aNestLevel ) const
|
|||
FormatInternalUnits( aDimension->GetExtensionHeight() ).c_str(),
|
||||
FormatInternalUnits( aDimension->GetExtensionOffset() ).c_str() );
|
||||
|
||||
if( !aDimension->GetKeepTextAligned() )
|
||||
if( aDimension->GetKeepTextAligned() )
|
||||
m_out->Print( 0, " keep_text_aligned" );
|
||||
|
||||
m_out->Print( 0, ")\n" );
|
||||
|
|
|
@ -741,9 +741,11 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
|
|||
dimension->SetUnitsMode( boardSettings.m_DimensionUnitsMode );
|
||||
dimension->SetUnitsFormat( boardSettings.m_DimensionUnitsFormat );
|
||||
dimension->SetPrecision( boardSettings.m_DimensionPrecision );
|
||||
dimension->SetSuppressZeroes( boardSettings.m_DimensionSuppressZeroes );
|
||||
dimension->SetTextPositionMode( boardSettings.m_DimensionTextPosition );
|
||||
dimension->SetKeepTextAligned( boardSettings.m_DimensionKeepTextAligned );
|
||||
dimension->SetArrowLength( boardSettings.m_DimensionArrowLength );
|
||||
dimension->SetExtensionOffset( boardSettings.m_DimensionExtensionOffset );
|
||||
dimension->SetStart( (wxPoint) cursorPos );
|
||||
dimension->SetEnd( (wxPoint) cursorPos );
|
||||
|
||||
|
|
Loading…
Reference in New Issue