Ensure junctions and no-connects are visible even on fat wires.
Also adds a preference for junction size. Fixes: lp:1545422 * https://bugs.launchpad.net/kicad/+bug/1545422
This commit is contained in:
parent
ca3751fbbb
commit
96724af2c4
|
@ -30,7 +30,7 @@
|
|||
#include <class_libentry.h>
|
||||
#include <panel_eeschema_display_options.h>
|
||||
#include <widgets/gal_options_panel.h>
|
||||
|
||||
#include <sch_junction.h>
|
||||
|
||||
PANEL_EESCHEMA_DISPLAY_OPTIONS::PANEL_EESCHEMA_DISPLAY_OPTIONS( SCH_EDIT_FRAME* aFrame,
|
||||
wxWindow* aWindow ) :
|
||||
|
@ -62,6 +62,7 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow()
|
|||
|
||||
m_busWidthCtrl->SetValue( StringFromValue( INCHES, GetDefaultBusThickness(), false, true ) );
|
||||
m_lineWidthCtrl->SetValue( StringFromValue( INCHES, GetDefaultLineThickness(), false, true ) );
|
||||
m_jctSizeCtrl->SetValue( StringFromValue( INCHES, SCH_JUNCTION::GetSymbolSize(), false, true ) );
|
||||
m_checkShowHiddenPins->SetValue( m_frame->GetShowAllPins() );
|
||||
m_checkPageLimits->SetValue( m_frame->ShowPageLimits() );
|
||||
|
||||
|
@ -97,6 +98,7 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow()
|
|||
|
||||
SetDefaultBusThickness( ValueFromString( INCHES, m_busWidthCtrl->GetValue(), true ) );
|
||||
SetDefaultLineThickness( ValueFromString( INCHES, m_lineWidthCtrl->GetValue(), true ) );
|
||||
SCH_JUNCTION::SetSymbolSize( ValueFromString( INCHES, m_jctSizeCtrl->GetValue(), true ) );
|
||||
m_frame->SetShowAllPins( m_checkShowHiddenPins->GetValue() );
|
||||
m_frame->SetShowPageLimits( m_checkPageLimits->GetValue() );
|
||||
|
||||
|
|
|
@ -17,88 +17,93 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( wxWind
|
|||
m_galOptionsSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
bPanelSizer->Add( m_galOptionsSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
bPanelSizer->Add( m_galOptionsSizer, 1, wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bRightColumn;
|
||||
bRightColumn = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizer2;
|
||||
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Dimensions") ), wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer32;
|
||||
fgSizer32 = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizer32 = new wxFlexGridSizer( 0, 3, 3, 0 );
|
||||
fgSizer32->AddGrowableCol( 1 );
|
||||
fgSizer32->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer32->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
fgSizer32->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_busWidthLabel = new wxStaticText( this, wxID_ANY, _("&Bus thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_busWidthLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("&Bus thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_busWidthLabel->Wrap( -1 );
|
||||
fgSizer32->Add( m_busWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_busWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP );
|
||||
fgSizer32->Add( m_busWidthCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
m_busWidthCtrl = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP );
|
||||
fgSizer32->Add( m_busWidthCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_busWidthUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_busWidthUnits = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_busWidthUnits->Wrap( -1 );
|
||||
fgSizer32->Add( m_busWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_lineWidthLabel = new wxStaticText( this, wxID_ANY, _("&Line thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("&Line thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthLabel->Wrap( -1 );
|
||||
fgSizer32->Add( m_lineWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
fgSizer32->Add( m_lineWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_lineWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP );
|
||||
fgSizer32->Add( m_lineWidthCtrl, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
m_lineWidthCtrl = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP );
|
||||
fgSizer32->Add( m_lineWidthCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_lineWidthUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthUnits = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthUnits->Wrap( -1 );
|
||||
fgSizer32->Add( m_lineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
fgSizer32->Add( m_lineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_jctSizeLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Junction size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_jctSizeLabel->Wrap( -1 );
|
||||
fgSizer32->Add( m_jctSizeLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_jctSizeCtrl = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer32->Add( m_jctSizeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_jctSizeUnits = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_jctSizeUnits->Wrap( -1 );
|
||||
fgSizer32->Add( m_jctSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer32->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 10 );
|
||||
sbSizer2->Add( fgSizer32, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
bRightColumn->Add( sbSizer2, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer1;
|
||||
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Annotations") ), wxVERTICAL );
|
||||
|
||||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
wxBoxSizer* bSizer6;
|
||||
bSizer6 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticText26 = new wxStaticText( this, wxID_ANY, _("Symbol unit notation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText26 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Symbol unit notation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText26->Wrap( -1 );
|
||||
fgSizer32->Add( m_staticText26, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
bSizer6->Add( m_staticText26, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
wxString m_choiceSeparatorRefIdChoices[] = { _("A"), _(".A"), _("-A"), _("_A"), _(".1"), _("-1"), _("_1") };
|
||||
int m_choiceSeparatorRefIdNChoices = sizeof( m_choiceSeparatorRefIdChoices ) / sizeof( wxString );
|
||||
m_choiceSeparatorRefId = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceSeparatorRefIdNChoices, m_choiceSeparatorRefIdChoices, 0 );
|
||||
m_choiceSeparatorRefId = new wxChoice( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceSeparatorRefIdNChoices, m_choiceSeparatorRefIdChoices, 0 );
|
||||
m_choiceSeparatorRefId->SetSelection( 0 );
|
||||
fgSizer32->Add( m_choiceSeparatorRefId, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
bSizer6->Add( m_choiceSeparatorRefId, 1, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
|
||||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
sbSizer1->Add( bSizer6, 0, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bRightColumn->Add( fgSizer32, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 5 );
|
||||
sbSizer1->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
|
||||
|
||||
wxBoxSizer* bSizer92;
|
||||
bSizer92 = new wxBoxSizer( wxVERTICAL );
|
||||
m_checkShowHiddenPins = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("S&how hidden pins"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer1->Add( m_checkShowHiddenPins, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_checkShowHiddenPins = new wxCheckBox( this, wxID_ANY, _("S&how hidden pins"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer92->Add( m_checkShowHiddenPins, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_checkPageLimits = new wxCheckBox( this, wxID_ANY, _("Show page limi&ts"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkPageLimits = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Show page limi&ts"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkPageLimits->SetValue(true);
|
||||
bSizer92->Add( m_checkPageLimits, 0, wxEXPAND|wxALL, 5 );
|
||||
sbSizer1->Add( m_checkPageLimits, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bRightColumn->Add( bSizer92, 0, wxTOP|wxRIGHT, 12 );
|
||||
bRightColumn->Add( sbSizer1, 1, wxEXPAND|wxTOP|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bPanelSizer->Add( bRightColumn, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
bPanelSizer->Add( bRightColumn, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
this->SetSizer( bPanelSizer );
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -95,7 +95,7 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
|
@ -103,6 +103,19 @@
|
|||
<property name="name">bRightColumn</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Dimensions</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>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxEXPAND</property>
|
||||
|
@ -118,37 +131,7 @@
|
|||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="rows">0</property>
|
||||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</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</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</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</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<property name="vgap">3</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
|
@ -234,7 +217,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
<property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -408,7 +391,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -491,7 +474,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||
<property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -582,7 +565,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -664,35 +647,288 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</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">Junction size:</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_jctSizeLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</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>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
|
||||
<property name="proportion">0</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_jctSizeCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</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>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<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>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</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">mils</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_jctSizeUnits</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</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>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Annotations</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbSizer1</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer6</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
|
@ -778,8 +1014,8 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxChoice" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
|
@ -864,27 +1100,18 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="0">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">12</property>
|
||||
<property name="flag">wxTOP|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer92</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/panel.h>
|
||||
|
@ -40,6 +41,9 @@ class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE : public wxPanel
|
|||
wxStaticText* m_lineWidthLabel;
|
||||
wxTextCtrl* m_lineWidthCtrl;
|
||||
wxStaticText* m_lineWidthUnits;
|
||||
wxStaticText* m_jctSizeLabel;
|
||||
wxTextCtrl* m_jctSizeCtrl;
|
||||
wxStaticText* m_jctSizeUnits;
|
||||
wxStaticText* m_staticText26;
|
||||
wxChoice* m_choiceSeparatorRefId;
|
||||
wxCheckBox* m_checkShowHiddenPins;
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include <dialogs/panel_libedit_settings.h>
|
||||
#include <sch_view.h>
|
||||
#include <sch_painter.h>
|
||||
#include "sch_junction.h"
|
||||
|
||||
#define FR_HISTORY_LIST_CNT 10 ///< Maximum number of find and replace strings.
|
||||
|
||||
|
@ -321,6 +322,7 @@ const wxChar LibIconScaleEntry[] = wxT( "LibIconScale" );
|
|||
static const wxChar FootprintPreviewEntry[] = wxT( "FootprintPreview" );
|
||||
static const wxChar DefaultBusWidthEntry[] = wxT( "DefaultBusWidth" );
|
||||
static const wxChar DefaultDrawLineWidthEntry[] = wxT( "DefaultDrawLineWidth" );
|
||||
static const wxChar DefaultJctSizeEntry[] = wxT( "DefaultJunctionSize" );
|
||||
static const wxChar ShowHiddenPinsEntry[] = wxT( "ShowHiddenPins" );
|
||||
static const wxChar HorzVertLinesOnlyEntry[] = wxT( "HorizVertLinesOnly" );
|
||||
static const wxChar PreviewFramePositionXEntry[] = wxT( "PreviewFramePositionX" );
|
||||
|
@ -408,6 +410,7 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
|
|||
|
||||
SetDefaultBusThickness( aCfg->Read( DefaultBusWidthEntry, DEFAULTBUSTHICKNESS ) );
|
||||
SetDefaultLineThickness( aCfg->Read( DefaultDrawLineWidthEntry, DEFAULTDRAWLINETHICKNESS ) );
|
||||
SCH_JUNCTION::SetSymbolSize( aCfg->Read( DefaultJctSizeEntry, SCH_JUNCTION::GetSymbolSize() ) );
|
||||
aCfg->Read( ShowHiddenPinsEntry, &m_showAllPins, false );
|
||||
aCfg->Read( HorzVertLinesOnlyEntry, &m_forceHVLines, true );
|
||||
aCfg->Read( AutoplaceFieldsEntry, &m_autoplaceFields, true );
|
||||
|
@ -477,6 +480,7 @@ void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
|
|||
|
||||
aCfg->Write( DefaultBusWidthEntry, (long) GetDefaultBusThickness() );
|
||||
aCfg->Write( DefaultDrawLineWidthEntry, (long) GetDefaultLineThickness() );
|
||||
aCfg->Write( DefaultJctSizeEntry, (long) SCH_JUNCTION::GetSymbolSize() );
|
||||
aCfg->Write( ShowHiddenPinsEntry, m_showAllPins );
|
||||
aCfg->Write( HorzVertLinesOnlyEntry, GetForceHVLines() );
|
||||
aCfg->Write( AutoplaceFieldsEntry, m_autoplaceFields );
|
||||
|
|
|
@ -42,6 +42,13 @@
|
|||
|
||||
int SCH_JUNCTION::m_symbolSize = 40; // Default diameter of the junction symbol
|
||||
|
||||
|
||||
int SCH_JUNCTION::GetEffectiveSymbolSize()
|
||||
{
|
||||
return std::max( KiROUND( GetDefaultLineThickness() * 1.5 ), m_symbolSize );
|
||||
}
|
||||
|
||||
|
||||
SCH_JUNCTION::SCH_JUNCTION( const wxPoint& pos ) :
|
||||
SCH_ITEM( NULL, SCH_JUNCTION_T )
|
||||
{
|
||||
|
@ -71,7 +78,7 @@ const EDA_RECT SCH_JUNCTION::GetBoundingBox() const
|
|||
EDA_RECT rect;
|
||||
|
||||
rect.SetOrigin( m_pos );
|
||||
rect.Inflate( ( GetPenSize() + GetSymbolSize() ) / 2 );
|
||||
rect.Inflate( ( GetPenSize() + GetEffectiveSymbolSize() ) / 2 );
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
@ -90,7 +97,7 @@ void SCH_JUNCTION::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffs
|
|||
GRSetDrawMode( aDC, aDrawMode );
|
||||
|
||||
GRFilledCircle( aPanel->GetClipBox(), aDC, m_pos.x + aOffset.x, m_pos.y + aOffset.y,
|
||||
( GetSymbolSize() / 2 ), 0, color, color );
|
||||
( GetEffectiveSymbolSize() / 2 ), 0, color, color );
|
||||
}
|
||||
|
||||
|
||||
|
@ -199,7 +206,7 @@ bool SCH_JUNCTION::doIsConnected( const wxPoint& aPosition ) const
|
|||
void SCH_JUNCTION::Plot( PLOTTER* aPlotter )
|
||||
{
|
||||
aPlotter->SetColor( GetLayerColor( GetLayer() ) );
|
||||
aPlotter->Circle( m_pos, GetSymbolSize(), FILLED_SHAPE );
|
||||
aPlotter->Circle( m_pos, GetEffectiveSymbolSize(), FILLED_SHAPE );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -53,6 +53,10 @@ public:
|
|||
static int GetSymbolSize() { return m_symbolSize; }
|
||||
static void SetSymbolSize( int aSize ) { m_symbolSize = aSize; }
|
||||
|
||||
// Return the size the symbol should be drawn at. This is GetSymbolSize() clamped to be
|
||||
// no less than 1.5 X the current wire width.
|
||||
static int GetEffectiveSymbolSize();
|
||||
|
||||
void SwapData( SCH_ITEM* aItem ) override;
|
||||
|
||||
const EDA_RECT GetBoundingBox() const override;
|
||||
|
|
|
@ -43,10 +43,8 @@
|
|||
SCH_NO_CONNECT::SCH_NO_CONNECT( const wxPoint& pos ) :
|
||||
SCH_ITEM( NULL, SCH_NO_CONNECT_T )
|
||||
{
|
||||
#define DRAWNOCONNECT_SIZE 48 /* No symbol connection range. */
|
||||
m_pos = pos;
|
||||
m_size.x = m_size.y = DRAWNOCONNECT_SIZE;
|
||||
#undef DRAWNOCONNECT_SIZE
|
||||
m_size = 48; ///< No-connect symbol size.
|
||||
|
||||
SetLayer( LAYER_NOCONNECT );
|
||||
}
|
||||
|
@ -71,7 +69,7 @@ void SCH_NO_CONNECT::SwapData( SCH_ITEM* aItem )
|
|||
|
||||
const EDA_RECT SCH_NO_CONNECT::GetBoundingBox() const
|
||||
{
|
||||
int delta = ( GetPenSize() + m_size.x ) / 2;
|
||||
int delta = ( GetPenSize() + GetSize() ) / 2;
|
||||
EDA_RECT box;
|
||||
|
||||
box.SetOrigin( m_pos );
|
||||
|
@ -98,7 +96,7 @@ void SCH_NO_CONNECT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOf
|
|||
GR_DRAWMODE aDrawMode, COLOR4D aColor )
|
||||
{
|
||||
int pX, pY;
|
||||
int delta = m_size.x / 2;
|
||||
int delta = GetSize() / 2;
|
||||
int width = GetDefaultLineThickness();
|
||||
|
||||
pX = m_pos.x + aOffset.x;
|
||||
|
@ -179,7 +177,7 @@ bool SCH_NO_CONNECT::doIsConnected( const wxPoint& aPosition ) const
|
|||
|
||||
bool SCH_NO_CONNECT::HitTest( const wxPoint& aPosition, int aAccuracy ) const
|
||||
{
|
||||
int delta = ( ( m_size.x + GetDefaultLineThickness() ) / 2 ) + aAccuracy;
|
||||
int delta = ( ( GetSize() + GetDefaultLineThickness() ) / 2 ) + aAccuracy;
|
||||
|
||||
wxPoint dist = aPosition - m_pos;
|
||||
|
||||
|
@ -205,7 +203,7 @@ bool SCH_NO_CONNECT::HitTest( const EDA_RECT& aRect, bool aContained, int aAccur
|
|||
|
||||
void SCH_NO_CONNECT::Plot( PLOTTER* aPlotter )
|
||||
{
|
||||
int delta = m_size.x / 2;
|
||||
int delta = GetSize() / 2;
|
||||
int pX, pY;
|
||||
|
||||
pX = m_pos.x;
|
||||
|
|
|
@ -37,7 +37,7 @@ class NETLIST_OBJECT_LIST;
|
|||
class SCH_NO_CONNECT : public SCH_ITEM
|
||||
{
|
||||
wxPoint m_pos; ///< Position of the no connect object.
|
||||
wxSize m_size; ///< Size of the no connect object.
|
||||
int m_size; ///< Size of the no connect object.
|
||||
|
||||
public:
|
||||
SCH_NO_CONNECT( const wxPoint& pos = wxPoint( 0, 0 ) );
|
||||
|
@ -51,9 +51,9 @@ public:
|
|||
return wxT( "SCH_NO_CONNECT" );
|
||||
}
|
||||
|
||||
wxSize GetSize() const
|
||||
int GetSize() const
|
||||
{
|
||||
return m_size;
|
||||
return std::max( m_size, KiROUND( GetDefaultLineThickness() * 3 ) );
|
||||
}
|
||||
|
||||
int GetPenSize() const override;
|
||||
|
|
|
@ -872,7 +872,7 @@ void SCH_PAINTER::draw( SCH_JUNCTION *aJct, int aLayer )
|
|||
m_gal->SetIsFill(true);
|
||||
m_gal->SetStrokeColor( color );
|
||||
m_gal->SetFillColor( color );
|
||||
m_gal->DrawCircle( aJct->GetPosition(), aJct->GetSymbolSize() / 2 );
|
||||
m_gal->DrawCircle( aJct->GetPosition(), aJct->GetEffectiveSymbolSize() / 2 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1254,7 +1254,7 @@ void SCH_PAINTER::draw( SCH_SHEET *aSheet, int aLayer )
|
|||
|
||||
void SCH_PAINTER::draw( SCH_NO_CONNECT *aNC, int aLayer )
|
||||
{
|
||||
int delta = aNC->GetSize().x / 2;
|
||||
int delta = aNC->GetSize() / 2;
|
||||
int width = GetDefaultLineThickness();
|
||||
|
||||
m_gal->SetStrokeColor( m_schSettings.GetLayerColor( LAYER_NOCONNECT ) );
|
||||
|
|
Loading…
Reference in New Issue