pcbnew: Add option to show ratsnest while moving

Re-works ratsnest display options in the configuration parameters rather
than the board file.  Moves ratsnest options to central preferences
location.

Fixes: lp:1826440
* https://bugs.launchpad.net/kicad/+bug/1826440

Fixes: lp:1821183
* https://bugs.launchpad.net/kicad/+bug/1821183
This commit is contained in:
Seth Hillbrand 2019-06-12 17:32:47 -07:00
parent 51b9319246
commit daad58e511
27 changed files with 458 additions and 823 deletions

View File

@ -317,7 +317,8 @@ enum GERBVIEW_LAYER_ID: int
( 1 << GAL_LAYER_INDEX( LAYER_VIAS_HOLES ) ) +\ ( 1 << GAL_LAYER_INDEX( LAYER_VIAS_HOLES ) ) +\
( 1 << GAL_LAYER_INDEX( LAYER_DRC ) ) +\ ( 1 << GAL_LAYER_INDEX( LAYER_DRC ) ) +\
( 1 << GAL_LAYER_INDEX( LAYER_SELECT_OVERLAY ) ) +\ ( 1 << GAL_LAYER_INDEX( LAYER_SELECT_OVERLAY ) ) +\
( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) ) ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) +\
( 1 << GAL_LAYER_INDEX( LAYER_RATSNEST ) ) )
/// A sequence of layers, a sequence provides a certain order. /// A sequence of layers, a sequence provides a certain order.

View File

@ -79,10 +79,11 @@ public:
* 3 show netnames on tracks and pads * 3 show netnames on tracks and pads
*/ */
bool m_DisplayDrawItemsFill; // How to display graphic items on board ( sketch/ filled ) bool m_DisplayDrawItemsFill; // How to display graphic items on board ( sketch/ filled )
bool m_ContrastModeDisplay; bool m_ContrastModeDisplay;
int m_MaxLinksShowed; // in track creation: number of hairwires shown int m_MaxLinksShowed; // in track creation: number of hairwires shown
bool m_Show_Module_Ratsnest; // When moving a footprint: allows displaying a ratsnest bool m_ShowModuleRatsnest; // When moving a footprint: allows displaying a ratsnest
bool m_ShowGlobalRatsnest; // If true, show all
bool m_DisplayRatsnestLinesCurved; // Airwires can be drawn as straight lines (false) bool m_DisplayRatsnestLinesCurved; // Airwires can be drawn as straight lines (false)
// or curved lines (true) // or curved lines (true)

View File

@ -486,18 +486,9 @@ void BOARD::SetElementVisibility( GAL_LAYER_ID aLayer, bool isEnabled )
{ {
case LAYER_RATSNEST: case LAYER_RATSNEST:
{ {
bool visible = IsElementVisible( LAYER_RATSNEST );
// we must clear or set the CH_VISIBLE flags to hide/show ratsnest
// because we have a tool to show/hide ratsnest relative to a pad or a module // because we have a tool to show/hide ratsnest relative to a pad or a module
// so the hide/show option is a per item selection // so the hide/show option is a per item selection
for( unsigned int net = 1 /* skip "No Net" at [0] */; net < GetNetCount(); net++ )
{
auto rn = GetConnectivity()->GetRatsnestForNet( net );
if( rn )
rn->SetVisible( visible );
}
for( auto track : Tracks() ) for( auto track : Tracks() )
track->SetLocalRatsnestVisible( isEnabled ); track->SetLocalRatsnestVisible( isEnabled );

View File

@ -272,9 +272,7 @@ void DIALOG_EXCHANGE_FOOTPRINTS::OnApplyClicked( wxCommandEvent& event )
if( processMatchingModules() ) if( processMatchingModules() )
{ {
if( m_parent->GetBoard()->IsElementVisible( LAYER_RATSNEST ) ) m_parent->Compile_Ratsnest( true );
m_parent->Compile_Ratsnest( true );
m_parent->GetGalCanvas()->Refresh(); m_parent->GetGalCanvas()->Refresh();
} }

View File

@ -65,7 +65,6 @@ bool PANEL_PCBNEW_DISPLAY_OPTIONS::TransferDataToWindow()
m_OptDisplayPadNumber->SetValue( displ_opts->m_DisplayPadNum ); m_OptDisplayPadNumber->SetValue( displ_opts->m_DisplayPadNum );
m_OptDisplayPadNoConn->SetValue( m_frame->IsElementVisible( LAYER_NO_CONNECTS ) ); m_OptDisplayPadNoConn->SetValue( m_frame->IsElementVisible( LAYER_NO_CONNECTS ) );
m_ShowNetNamesOption->SetSelection( displ_opts->m_DisplayNetNamesMode ); m_ShowNetNamesOption->SetSelection( displ_opts->m_DisplayNetNamesMode );
m_OptDisplayCurvedRatsnestLines->SetValue( displ_opts->m_DisplayRatsnestLinesCurved );
m_galOptsPanel->TransferDataToWindow(); m_galOptsPanel->TransferDataToWindow();
@ -89,7 +88,6 @@ bool PANEL_PCBNEW_DISPLAY_OPTIONS::TransferDataFromWindow()
m_frame->SetElementVisibility( LAYER_NO_CONNECTS, m_OptDisplayPadNoConn->GetValue() ); m_frame->SetElementVisibility( LAYER_NO_CONNECTS, m_OptDisplayPadNoConn->GetValue() );
displ_opts->m_DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection(); displ_opts->m_DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
displ_opts->m_DisplayRatsnestLinesCurved = m_OptDisplayCurvedRatsnestLines->GetValue();
m_galOptsPanel->TransferDataFromWindow(); m_galOptsPanel->TransferDataFromWindow();
@ -97,12 +95,13 @@ bool PANEL_PCBNEW_DISPLAY_OPTIONS::TransferDataFromWindow()
KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView();
KIGFX::PCB_PAINTER* painter = static_cast<KIGFX::PCB_PAINTER*>( view->GetPainter() ); KIGFX::PCB_PAINTER* painter = static_cast<KIGFX::PCB_PAINTER*>( view->GetPainter() );
KIGFX::PCB_RENDER_SETTINGS* settings = painter->GetSettings(); KIGFX::PCB_RENDER_SETTINGS* settings = painter->GetSettings();
settings->LoadDisplayOptions( displ_opts, m_frame->ShowPageLimits() ); settings->LoadDisplayOptions( displ_opts, m_frame->ShowPageLimits() );
m_frame->SetElementVisibility( LAYER_RATSNEST, displ_opts->m_ShowGlobalRatsnest );
view->RecacheAllItems(); view->RecacheAllItems();
view->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
m_frame->GetGalCanvas()->Refresh();
return true; return true;
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017) // C++ code generated with wxFormBuilder (version Apr 23 2019)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -9,77 +9,68 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::PANEL_PCBNEW_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::PANEL_PCBNEW_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{ {
wxBoxSizer* bMainSizer; wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL ); bMainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bupperSizer; wxBoxSizer* bupperSizer;
bupperSizer = new wxBoxSizer( wxHORIZONTAL ); bupperSizer = new wxBoxSizer( wxHORIZONTAL );
m_galOptionsSizer = new wxBoxSizer( wxVERTICAL ); m_galOptionsSizer = new wxBoxSizer( wxVERTICAL );
bupperSizer->Add( m_galOptionsSizer, 1, wxEXPAND, 5 ); bupperSizer->Add( m_galOptionsSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bRightSizer; wxBoxSizer* bRightSizer;
bRightSizer = new wxBoxSizer( wxVERTICAL ); bRightSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbAnnotations; wxStaticBoxSizer* sbAnnotations;
sbAnnotations = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Annotations") ), wxVERTICAL ); sbAnnotations = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Annotations") ), wxVERTICAL );
wxString m_ShowNetNamesOptionChoices[] = { _("Do not show"), _("Show on pads"), _("Show on tracks"), _("Show on pads and tracks") }; wxString m_ShowNetNamesOptionChoices[] = { _("Do not show"), _("Show on pads"), _("Show on tracks"), _("Show on pads and tracks") };
int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString ); int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString );
m_ShowNetNamesOption = new wxRadioBox( sbAnnotations->GetStaticBox(), wxID_ANY, _("Net Names"), wxDefaultPosition, wxDefaultSize, m_ShowNetNamesOptionNChoices, m_ShowNetNamesOptionChoices, 1, wxRA_SPECIFY_COLS ); m_ShowNetNamesOption = new wxRadioBox( sbAnnotations->GetStaticBox(), wxID_ANY, _("Net Names"), wxDefaultPosition, wxDefaultSize, m_ShowNetNamesOptionNChoices, m_ShowNetNamesOptionChoices, 1, wxRA_SPECIFY_COLS );
m_ShowNetNamesOption->SetSelection( 0 ); m_ShowNetNamesOption->SetSelection( 0 );
m_ShowNetNamesOption->SetToolTip( _("Show or hide net names on pads and/or tracks.") ); m_ShowNetNamesOption->SetToolTip( _("Show or hide net names on pads and/or tracks.") );
sbAnnotations->Add( m_ShowNetNamesOption, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); sbAnnotations->Add( m_ShowNetNamesOption, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_OptDisplayPadNumber = new wxCheckBox( sbAnnotations->GetStaticBox(), wxID_ANY, _("Show pad numbers"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadNumber = new wxCheckBox( sbAnnotations->GetStaticBox(), wxID_ANY, _("Show pad numbers"), wxDefaultPosition, wxDefaultSize, 0 );
m_OptDisplayPadNumber->SetValue(true); m_OptDisplayPadNumber->SetValue(true);
sbAnnotations->Add( m_OptDisplayPadNumber, 0, wxALL, 6 ); sbAnnotations->Add( m_OptDisplayPadNumber, 0, wxALL, 6 );
m_OptDisplayPadNoConn = new wxCheckBox( sbAnnotations->GetStaticBox(), wxID_ANY, _("Show pad <no net> indicator"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadNoConn = new wxCheckBox( sbAnnotations->GetStaticBox(), wxID_ANY, _("Show pad <no net> indicator"), wxDefaultPosition, wxDefaultSize, 0 );
m_OptDisplayPadNoConn->SetValue(true); m_OptDisplayPadNoConn->SetValue(true);
sbAnnotations->Add( m_OptDisplayPadNoConn, 0, wxBOTTOM|wxLEFT|wxRIGHT, 6 ); sbAnnotations->Add( m_OptDisplayPadNoConn, 0, wxBOTTOM|wxLEFT|wxRIGHT, 6 );
bRightSizer->Add( sbAnnotations, 0, wxEXPAND|wxBOTTOM, 5 ); bRightSizer->Add( sbAnnotations, 0, wxEXPAND|wxBOTTOM, 5 );
wxStaticBoxSizer* sbClearance; wxStaticBoxSizer* sbClearance;
sbClearance = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Clearance Outlines") ), wxVERTICAL ); sbClearance = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Clearance Outlines") ), wxVERTICAL );
wxString m_OptDisplayTracksClearanceChoices[] = { _("Do not show"), _("Show when creating tracks"), _("Show with via clearance at end"), _("Show when creating and editing tracks"), _("Show always") }; wxString m_OptDisplayTracksClearanceChoices[] = { _("Do not show"), _("Show when creating tracks"), _("Show with via clearance at end"), _("Show when creating and editing tracks"), _("Show always") };
int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString ); int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString );
m_OptDisplayTracksClearance = new wxRadioBox( sbClearance->GetStaticBox(), ID_SHOW_CLEARANCE, _("Track Clearance"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS ); m_OptDisplayTracksClearance = new wxRadioBox( sbClearance->GetStaticBox(), ID_SHOW_CLEARANCE, _("Track Clearance"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayTracksClearance->SetSelection( 2 ); m_OptDisplayTracksClearance->SetSelection( 2 );
m_OptDisplayTracksClearance->SetToolTip( _("Show or hide the track and via clearance area. If \"New track\" is selected, track clearance area is shown only when creating the track.") ); m_OptDisplayTracksClearance->SetToolTip( _("Show or hide the track and via clearance area. If \"New track\" is selected, track clearance area is shown only when creating the track.") );
sbClearance->Add( m_OptDisplayTracksClearance, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); sbClearance->Add( m_OptDisplayTracksClearance, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_OptDisplayPadClearence = new wxCheckBox( sbClearance->GetStaticBox(), wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadClearence = new wxCheckBox( sbClearance->GetStaticBox(), wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
sbClearance->Add( m_OptDisplayPadClearence, 0, wxALL, 6 ); sbClearance->Add( m_OptDisplayPadClearence, 0, wxALL, 6 );
bRightSizer->Add( sbClearance, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 ); bRightSizer->Add( sbClearance, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
wxStaticBoxSizer* sbGeneral;
sbGeneral = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("General") ), wxVERTICAL );
m_OptDisplayCurvedRatsnestLines = new wxCheckBox( sbGeneral->GetStaticBox(), wxID_ANY, _("Show ratsnest with curved lines"), wxDefaultPosition, wxDefaultSize, 0 );
sbGeneral->Add( m_OptDisplayCurvedRatsnestLines, 0, wxBOTTOM|wxRIGHT|wxLEFT, 6 );
bRightSizer->Add( sbGeneral, 0, wxEXPAND|wxTOP, 5 );
bupperSizer->Add( bRightSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); bupperSizer->Add( bRightSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
this->SetSizer( bMainSizer ); this->SetSizer( bMainSizer );
this->Layout(); this->Layout();
bMainSizer->Fit( this ); bMainSizer->Fit( this );

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="13" /> <FileVersion major="1" minor="15" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration"></property> <property name="class_decoration"></property>
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
@ -14,6 +14,8 @@
<property name="file">panel_pcbnew_display_options_base</property> <property name="file">panel_pcbnew_display_options_base</property>
<property name="first_id">1000</property> <property name="first_id">1000</property>
<property name="help_provider">none</property> <property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property> <property name="internationalize">1</property>
<property name="name">PanelPcbnewDisplayOptions</property> <property name="name">PanelPcbnewDisplayOptions</property>
<property name="namespace"></property> <property name="namespace"></property>
@ -24,6 +26,7 @@
<property name="skip_php_events">1</property> <property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="ui_table">UI</property> <property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">1</property> <property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Panel" expanded="1"> <object class="Panel" expanded="1">
@ -48,36 +51,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property> <property name="window_style">wxTAB_TRAVERSAL</property>
<event name="OnAuiFindManager"></event>
<event name="OnAuiPaneButton"></event>
<event name="OnAuiPaneClose"></event>
<event name="OnAuiPaneMaximize"></event>
<event name="OnAuiPaneRestore"></event>
<event name="OnAuiRender"></event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnInitDialog"></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 class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bMainSizer</property> <property name="name">bMainSizer</property>
@ -112,11 +85,11 @@
<property name="name">bRightSizer</property> <property name="name">bRightSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM</property> <property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxStaticBoxSizer" expanded="0">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Annotations</property> <property name="label">Annotations</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -124,7 +97,6 @@
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="parent">1</property> <property name="parent">1</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
@ -189,30 +161,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></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="OnRadioBox"></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 class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
@ -277,30 +225,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></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 class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
@ -365,39 +289,15 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></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> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxEXPAND|wxTOP</property> <property name="flag">wxBOTTOM|wxEXPAND|wxTOP</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxStaticBoxSizer" expanded="0">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Clearance Outlines</property> <property name="label">Clearance Outlines</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -405,7 +305,6 @@
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="parent">1</property> <property name="parent">1</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
@ -470,30 +369,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></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="OnRadioBox"></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 class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
@ -558,133 +433,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></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 class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">General</property>
<property name="minimum_size"></property>
<property name="name">sbGeneral</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">6</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">Show ratsnest with curved lines</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_OptDisplayCurvedRatsnestLines</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"></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>
<event name="OnChar"></event>
<event name="OnCheckBox"></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>

View File

@ -1,12 +1,11 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017) // C++ code generated with wxFormBuilder (version Apr 23 2019)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __PANEL_PCBNEW_DISPLAY_OPTIONS_BASE_H__ #pragma once
#define __PANEL_PCBNEW_DISPLAY_OPTIONS_BASE_H__
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
@ -27,29 +26,27 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_PCBNEW_DISPLAY_OPTIONS_BASE /// Class PANEL_PCBNEW_DISPLAY_OPTIONS_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class PANEL_PCBNEW_DISPLAY_OPTIONS_BASE : public wxPanel class PANEL_PCBNEW_DISPLAY_OPTIONS_BASE : public wxPanel
{ {
private: private:
protected: protected:
enum enum
{ {
ID_SHOW_CLEARANCE = 1000 ID_SHOW_CLEARANCE = 1000
}; };
wxBoxSizer* m_galOptionsSizer; wxBoxSizer* m_galOptionsSizer;
wxRadioBox* m_ShowNetNamesOption; wxRadioBox* m_ShowNetNamesOption;
wxCheckBox* m_OptDisplayPadNumber; wxCheckBox* m_OptDisplayPadNumber;
wxCheckBox* m_OptDisplayPadNoConn; wxCheckBox* m_OptDisplayPadNoConn;
wxRadioBox* m_OptDisplayTracksClearance; wxRadioBox* m_OptDisplayTracksClearance;
wxCheckBox* m_OptDisplayPadClearence; wxCheckBox* m_OptDisplayPadClearence;
wxCheckBox* m_OptDisplayCurvedRatsnestLines;
public: public:
PANEL_PCBNEW_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); PANEL_PCBNEW_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_PCBNEW_DISPLAY_OPTIONS_BASE(); ~PANEL_PCBNEW_DISPLAY_OPTIONS_BASE();
}; };
#endif //__PANEL_PCBNEW_DISPLAY_OPTIONS_BASE_H__

View File

@ -41,9 +41,15 @@ PANEL_PCBNEW_SETTINGS::PANEL_PCBNEW_SETTINGS( PCB_EDIT_FRAME* aFrame, PAGED_DIAL
bool PANEL_PCBNEW_SETTINGS::TransferDataToWindow() bool PANEL_PCBNEW_SETTINGS::TransferDataToWindow()
{ {
const PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*) m_Frame->GetDisplayOptions();
/* Set display options */ /* Set display options */
m_PolarDisplay->SetSelection( m_Frame->GetShowPolarCoords() ? 1 : 0 ); m_PolarDisplay->SetSelection( m_Frame->GetShowPolarCoords() ? 1 : 0 );
m_UnitsSelection->SetSelection( m_Frame->GetUserUnits() == INCHES ? 0 : 1 ); m_UnitsSelection->SetSelection( m_Frame->GetUserUnits() == INCHES ? 0 : 1 );
m_OptDisplayCurvedRatsnestLines->SetValue( displ_opts->m_DisplayRatsnestLinesCurved );
m_showGlobalRatsnest->SetValue( displ_opts->m_ShowGlobalRatsnest );
m_showSelectedRatsnest->SetValue( displ_opts->m_ShowModuleRatsnest );
m_OptDisplayCurvedRatsnestLines->SetValue( displ_opts->m_DisplayRatsnestLinesCurved );
wxString rotationAngle; wxString rotationAngle;
rotationAngle = AngleToStringDegrees( (double)m_Frame->GetRotationAngle() ); rotationAngle = AngleToStringDegrees( (double)m_Frame->GetRotationAngle() );
@ -86,7 +92,15 @@ bool PANEL_PCBNEW_SETTINGS::TransferDataFromWindow()
KIGFX::PCB_PAINTER* painter = static_cast<KIGFX::PCB_PAINTER*>( view->GetPainter() ); KIGFX::PCB_PAINTER* painter = static_cast<KIGFX::PCB_PAINTER*>( view->GetPainter() );
KIGFX::PCB_RENDER_SETTINGS* settings = painter->GetSettings(); KIGFX::PCB_RENDER_SETTINGS* settings = painter->GetSettings();
displ_opts->m_DisplayRatsnestLinesCurved = m_OptDisplayCurvedRatsnestLines->GetValue();
displ_opts->m_ShowGlobalRatsnest = m_showGlobalRatsnest->GetValue();
displ_opts->m_ShowModuleRatsnest = m_showSelectedRatsnest->GetValue();
settings->LoadDisplayOptions( displ_opts, m_Frame->ShowPageLimits() ); settings->LoadDisplayOptions( displ_opts, m_Frame->ShowPageLimits() );
view->RecacheAllItems();
view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
m_Frame->GetGalCanvas()->Refresh();
return true; return true;
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017) // C++ code generated with wxFormBuilder (version Apr 23 2019)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -9,145 +9,160 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
PANEL_PCBNEW_SETTINGS_BASE::PANEL_PCBNEW_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) PANEL_PCBNEW_SETTINGS_BASE::PANEL_PCBNEW_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{ {
wxBoxSizer* bPanelSizer; wxBoxSizer* bPanelSizer;
bPanelSizer = new wxBoxSizer( wxHORIZONTAL ); bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bMargins; wxBoxSizer* bMargins;
bMargins = new wxBoxSizer( wxHORIZONTAL ); bMargins = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bMiddleLeftSizer; wxBoxSizer* bMiddleLeftSizer;
bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL ); bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") }; wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") };
int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString ); int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS ); m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
m_PolarDisplay->SetSelection( 0 ); m_PolarDisplay->SetSelection( 0 );
m_PolarDisplay->SetToolTip( _("Set display of relative (dx/dy) coordinates to Cartesian (rectangular) or polar (angle/distance).") ); m_PolarDisplay->SetToolTip( _("Set display of relative (dx/dy) coordinates to Cartesian (rectangular) or polar (angle/distance).") );
bMiddleLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 ); bMiddleLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 );
wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") }; wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") };
int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString ); int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString );
m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS ); m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS );
m_UnitsSelection->SetSelection( 0 ); m_UnitsSelection->SetSelection( 0 );
m_UnitsSelection->SetToolTip( _("Set units used to display dimensions and positions.") ); m_UnitsSelection->SetToolTip( _("Set units used to display dimensions and positions.") );
bMiddleLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 ); bMiddleLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* bOptionsSizer; wxStaticBoxSizer* bOptionsSizer;
bOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Editing Options") ), wxVERTICAL ); bOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Editing Options") ), wxVERTICAL );
m_Show_Page_Limits = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, 0 ); m_Show_Page_Limits = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, 0 );
m_Show_Page_Limits->SetValue(true); m_Show_Page_Limits->SetValue(true);
bOptionsSizer->Add( m_Show_Page_Limits, 0, wxALL, 5 ); bOptionsSizer->Add( m_Show_Page_Limits, 0, wxALL, 5 );
m_Segments_45_Only_Ctrl = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); m_Segments_45_Only_Ctrl = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") ); m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") );
bOptionsSizer->Add( m_Segments_45_Only_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); bOptionsSizer->Add( m_Segments_45_Only_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_UseEditKeyForWidth = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Edit hotkey changes track width"), wxDefaultPosition, wxDefaultSize, 0 ); m_UseEditKeyForWidth = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Edit hotkey changes track width"), wxDefaultPosition, wxDefaultSize, 0 );
m_UseEditKeyForWidth->SetToolTip( _("When active, hitting Edit hotkey or double-clicking on a track or via changes its width/diameter to the one selected in the main toolbar. ") ); m_UseEditKeyForWidth->SetToolTip( _("When active, hitting Edit hotkey or double-clicking on a track or via changes its width/diameter to the one selected in the main toolbar. ") );
bOptionsSizer->Add( m_UseEditKeyForWidth, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); bOptionsSizer->Add( m_UseEditKeyForWidth, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_dragSelects = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Prefer selection to dragging"), wxDefaultPosition, wxDefaultSize, 0 ); m_dragSelects = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Prefer selection to dragging"), wxDefaultPosition, wxDefaultSize, 0 );
m_dragSelects->SetToolTip( _("When enabled and nothing is selected, drag gesture will draw a selection box, even if there are items under the cursor that could be immediately dragged.") ); m_dragSelects->SetToolTip( _("When enabled and nothing is selected, drag gesture will draw a selection box, even if there are items under the cursor that could be immediately dragged.") );
bOptionsSizer->Add( m_dragSelects, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); bOptionsSizer->Add( m_dragSelects, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
wxFlexGridSizer* fgSizer12; wxFlexGridSizer* fgSizer12;
fgSizer12 = new wxFlexGridSizer( 0, 2, 0, 0 ); fgSizer12 = new wxFlexGridSizer( 0, 2, 0, 0 );
fgSizer12->AddGrowableCol( 1 ); fgSizer12->AddGrowableCol( 1 );
fgSizer12->SetFlexibleDirection( wxBOTH ); fgSizer12->SetFlexibleDirection( wxBOTH );
fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticTextRotationAngle = new wxStaticText( bOptionsSizer->GetStaticBox(), wxID_ANY, _("&Rotation angle:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextRotationAngle = new wxStaticText( bOptionsSizer->GetStaticBox(), wxID_ANY, _("&Rotation angle:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRotationAngle->Wrap( -1 ); m_staticTextRotationAngle->Wrap( -1 );
fgSizer12->Add( m_staticTextRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizer12->Add( m_staticTextRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_RotationAngle = new wxTextCtrl( bOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_RotationAngle = new wxTextCtrl( bOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_RotationAngle->SetToolTip( _("Set increment (in degrees) for context menu and hotkey rotation.") ); m_RotationAngle->SetToolTip( _("Set increment (in degrees) for context menu and hotkey rotation.") );
fgSizer12->Add( m_RotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); fgSizer12->Add( m_RotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
bOptionsSizer->Add( fgSizer12, 1, wxEXPAND, 5 ); bOptionsSizer->Add( fgSizer12, 1, wxEXPAND, 5 );
bMiddleLeftSizer->Add( bOptionsSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); bMiddleLeftSizer->Add( bOptionsSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bMargins->Add( bMiddleLeftSizer, 1, wxEXPAND|wxRIGHT, 5 ); bMargins->Add( bMiddleLeftSizer, 1, wxEXPAND|wxRIGHT, 5 );
wxBoxSizer* bRightSizer; wxBoxSizer* bRightSizer;
bRightSizer = new wxBoxSizer( wxVERTICAL ); bRightSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbMagnets; wxStaticBoxSizer* sbMagnets;
sbMagnets = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Magnetic Points") ), wxVERTICAL ); sbMagnets = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Magnetic Points") ), wxVERTICAL );
wxFlexGridSizer* fgSizer2; wxFlexGridSizer* fgSizer2;
fgSizer2 = new wxFlexGridSizer( 0, 2, 3, 0 ); fgSizer2 = new wxFlexGridSizer( 0, 2, 3, 0 );
fgSizer2->SetFlexibleDirection( wxBOTH ); fgSizer2->SetFlexibleDirection( wxBOTH );
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText2 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to pads:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText2 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to pads:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 ); m_staticText2->Wrap( -1 );
m_staticText2->SetToolTip( _("Capture cursor when the mouse enters a pad area") ); m_staticText2->SetToolTip( _("Capture cursor when the mouse enters a pad area") );
fgSizer2->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxString m_magneticPadChoiceChoices[] = { _("Never"), _("When creating tracks"), _("Always") }; wxString m_magneticPadChoiceChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
int m_magneticPadChoiceNChoices = sizeof( m_magneticPadChoiceChoices ) / sizeof( wxString ); int m_magneticPadChoiceNChoices = sizeof( m_magneticPadChoiceChoices ) / sizeof( wxString );
m_magneticPadChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticPadChoiceNChoices, m_magneticPadChoiceChoices, 0 ); m_magneticPadChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticPadChoiceNChoices, m_magneticPadChoiceChoices, 0 );
m_magneticPadChoice->SetSelection( 1 ); m_magneticPadChoice->SetSelection( 1 );
m_magneticPadChoice->SetToolTip( _("Capture cursor when the mouse enters a pad area") ); m_magneticPadChoice->SetToolTip( _("Capture cursor when the mouse enters a pad area") );
fgSizer2->Add( m_magneticPadChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( m_magneticPadChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticText21 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to tracks:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText21 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to tracks:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText21->Wrap( -1 ); m_staticText21->Wrap( -1 );
m_staticText21->SetToolTip( _("Capture cursor when the mouse approaches a track") ); m_staticText21->SetToolTip( _("Capture cursor when the mouse approaches a track") );
fgSizer2->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
wxString m_magneticTrackChoiceChoices[] = { _("Never"), _("When creating tracks"), _("Always") }; wxString m_magneticTrackChoiceChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
int m_magneticTrackChoiceNChoices = sizeof( m_magneticTrackChoiceChoices ) / sizeof( wxString ); int m_magneticTrackChoiceNChoices = sizeof( m_magneticTrackChoiceChoices ) / sizeof( wxString );
m_magneticTrackChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticTrackChoiceNChoices, m_magneticTrackChoiceChoices, 0 ); m_magneticTrackChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticTrackChoiceNChoices, m_magneticTrackChoiceChoices, 0 );
m_magneticTrackChoice->SetSelection( 1 ); m_magneticTrackChoice->SetSelection( 1 );
m_magneticTrackChoice->SetToolTip( _("Capture cursor when the mouse approaches a track") ); m_magneticTrackChoice->SetToolTip( _("Capture cursor when the mouse approaches a track") );
fgSizer2->Add( m_magneticTrackChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 ); fgSizer2->Add( m_magneticTrackChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticText211 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to graphics:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText211 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText211->Wrap( -1 ); m_staticText211->Wrap( -1 );
m_staticText211->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") ); m_staticText211->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") );
fgSizer2->Add( m_staticText211, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( m_staticText211, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
wxString m_magneticGraphicsChoiceChoices[] = { _("Always"), _("Never") }; wxString m_magneticGraphicsChoiceChoices[] = { _("Always"), _("Never") };
int m_magneticGraphicsChoiceNChoices = sizeof( m_magneticGraphicsChoiceChoices ) / sizeof( wxString ); int m_magneticGraphicsChoiceNChoices = sizeof( m_magneticGraphicsChoiceChoices ) / sizeof( wxString );
m_magneticGraphicsChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticGraphicsChoiceNChoices, m_magneticGraphicsChoiceChoices, 0 ); m_magneticGraphicsChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticGraphicsChoiceNChoices, m_magneticGraphicsChoiceChoices, 0 );
m_magneticGraphicsChoice->SetSelection( 0 ); m_magneticGraphicsChoice->SetSelection( 0 );
m_magneticGraphicsChoice->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") ); m_magneticGraphicsChoice->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") );
fgSizer2->Add( m_magneticGraphicsChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 ); fgSizer2->Add( m_magneticGraphicsChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
sbMagnets->Add( fgSizer2, 1, wxEXPAND, 5 ); sbMagnets->Add( fgSizer2, 1, wxEXPAND, 5 );
bRightSizer->Add( sbMagnets, 1, wxEXPAND, 5 ); bRightSizer->Add( sbMagnets, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizer3;
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Ratsnest") ), wxVERTICAL );
m_showGlobalRatsnest = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Show ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer3->Add( m_showGlobalRatsnest, 0, wxALL, 5 );
m_showSelectedRatsnest = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Always show selected ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer3->Add( m_showSelectedRatsnest, 0, wxALL, 5 );
m_OptDisplayCurvedRatsnestLines = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Show ratsnest with curved lines"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer3->Add( m_OptDisplayCurvedRatsnestLines, 0, wxALL, 5 );
bRightSizer->Add( sbSizer3, 1, wxEXPAND, 5 );
bMargins->Add( bRightSizer, 1, wxEXPAND|wxTOP|wxRIGHT, 5 ); bMargins->Add( bRightSizer, 1, wxEXPAND|wxTOP|wxRIGHT, 5 );
bPanelSizer->Add( bMargins, 1, wxRIGHT, 5 ); bPanelSizer->Add( bMargins, 1, wxRIGHT, 5 );
this->SetSizer( bPanelSizer ); this->SetSizer( bPanelSizer );
this->Layout(); this->Layout();
bPanelSizer->Fit( this ); bPanelSizer->Fit( this );

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="13" /> <FileVersion major="1" minor="15" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration"></property> <property name="class_decoration"></property>
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
@ -14,6 +14,8 @@
<property name="file">panel_pcbnew_settings_base</property> <property name="file">panel_pcbnew_settings_base</property>
<property name="first_id">1000</property> <property name="first_id">1000</property>
<property name="help_provider">none</property> <property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property> <property name="internationalize">1</property>
<property name="name">PanelPcbnewSettings</property> <property name="name">PanelPcbnewSettings</property>
<property name="namespace"></property> <property name="namespace"></property>
@ -24,6 +26,7 @@
<property name="skip_php_events">1</property> <property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="ui_table">UI</property> <property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">1</property> <property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Panel" expanded="1"> <object class="Panel" expanded="1">
@ -48,36 +51,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property> <property name="window_style">wxTAB_TRAVERSAL</property>
<event name="OnAuiFindManager"></event>
<event name="OnAuiPaneButton"></event>
<event name="OnAuiPaneClose"></event>
<event name="OnAuiPaneMaximize"></event>
<event name="OnAuiPaneRestore"></event>
<event name="OnAuiRender"></event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnInitDialog"></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 class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bPanelSizer</property> <property name="name">bPanelSizer</property>
@ -165,30 +138,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></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="OnRadioBox"></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 class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
@ -255,30 +204,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></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="OnRadioBox"></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 class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -293,7 +218,6 @@
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="parent">1</property> <property name="parent">1</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxALL</property>
@ -356,30 +280,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></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 class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -444,30 +344,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></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 class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -532,30 +408,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></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 class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -599,7 +451,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">g_DragSelects</property> <property name="name">m_dragSelects</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -620,30 +472,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></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 class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -695,6 +523,7 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">&amp;Rotation angle:</property> <property name="label">&amp;Rotation angle:</property>
<property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -720,29 +549,6 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<property name="wrap">-1</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 class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -807,33 +613,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></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> </object>
</object> </object>
@ -863,12 +642,11 @@
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="parent">1</property> <property name="parent">1</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxFlexGridSizer" expanded="1"> <object class="wxFlexGridSizer" expanded="0">
<property name="cols">2</property> <property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property> <property name="flexible_direction">wxBOTH</property>
<property name="growablecols"></property> <property name="growablecols"></property>
@ -880,11 +658,11 @@
<property name="permission">none</property> <property name="permission">none</property>
<property name="rows">0</property> <property name="rows">0</property>
<property name="vgap">3</property> <property name="vgap">3</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -913,6 +691,7 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Snap to pads:</property> <property name="label">Snap to pads:</property>
<property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -938,36 +717,13 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<property name="wrap">-1</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 class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxChoice" expanded="1"> <object class="wxChoice" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1025,37 +781,13 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnChoice"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<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 class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1084,6 +816,7 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Snap to tracks:</property> <property name="label">Snap to tracks:</property>
<property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1109,36 +842,13 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<property name="wrap">-1</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 class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxChoice" expanded="1"> <object class="wxChoice" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1196,37 +906,13 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnChoice"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<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 class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1255,6 +941,7 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Snap to graphics:</property> <property name="label">Snap to graphics:</property>
<property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1280,36 +967,13 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<property name="wrap">-1</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 class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxChoice" expanded="1"> <object class="wxChoice" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1367,36 +1031,218 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnChoice"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<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> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Ratsnest</property>
<property name="minimum_size"></property>
<property name="name">sbSizer3</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">wxALL</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">Show ratsnest</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_showGlobalRatsnest</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">wxALL</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">Always show selected ratsnest</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_showSelectedRatsnest</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">wxALL</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">Show ratsnest with curved lines</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_OptDisplayCurvedRatsnestLines</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> </object>
</object> </object>

View File

@ -1,12 +1,11 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017) // C++ code generated with wxFormBuilder (version Apr 23 2019)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __PANEL_PCBNEW_SETTINGS_BASE_H__ #pragma once
#define __PANEL_PCBNEW_SETTINGS_BASE_H__
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
@ -30,10 +29,10 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_PCBNEW_SETTINGS_BASE /// Class PANEL_PCBNEW_SETTINGS_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class PANEL_PCBNEW_SETTINGS_BASE : public wxPanel class PANEL_PCBNEW_SETTINGS_BASE : public wxPanel
{ {
private: private:
protected: protected:
enum enum
{ {
@ -41,7 +40,7 @@ class PANEL_PCBNEW_SETTINGS_BASE : public wxPanel
wxID_UNITS, wxID_UNITS,
wxID_SEGMENTS45 wxID_SEGMENTS45
}; };
wxRadioBox* m_PolarDisplay; wxRadioBox* m_PolarDisplay;
wxRadioBox* m_UnitsSelection; wxRadioBox* m_UnitsSelection;
wxCheckBox* m_Show_Page_Limits; wxCheckBox* m_Show_Page_Limits;
@ -56,12 +55,14 @@ class PANEL_PCBNEW_SETTINGS_BASE : public wxPanel
wxChoice* m_magneticTrackChoice; wxChoice* m_magneticTrackChoice;
wxStaticText* m_staticText211; wxStaticText* m_staticText211;
wxChoice* m_magneticGraphicsChoice; wxChoice* m_magneticGraphicsChoice;
wxCheckBox* m_showGlobalRatsnest;
wxCheckBox* m_showSelectedRatsnest;
wxCheckBox* m_OptDisplayCurvedRatsnestLines;
public: public:
PANEL_PCBNEW_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); PANEL_PCBNEW_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_PCBNEW_SETTINGS_BASE(); ~PANEL_PCBNEW_SETTINGS_BASE();
}; };
#endif //__PANEL_PCBNEW_SETTINGS_BASE_H__

View File

@ -58,7 +58,7 @@ bool PCB_EDIT_FRAME::Clear_Pcb( bool aQuery, bool aFinal )
// Items visibility flags will be set because a new board will be created. // Items visibility flags will be set because a new board will be created.
// Grid and ratsnest can be left to their previous state // Grid and ratsnest can be left to their previous state
bool showGrid = IsElementVisible( LAYER_GRID ); bool showGrid = IsElementVisible( LAYER_GRID );
bool showRats = IsElementVisible( LAYER_RATSNEST ); bool showRats = m_DisplayOptions.m_ShowGlobalRatsnest;
if( !aFinal ) if( !aFinal )
{ {

View File

@ -509,8 +509,7 @@ void PCB_BASE_FRAME::PlaceModule( MODULE* aModule, bool aRecreateRatsnest )
if( aRecreateRatsnest ) if( aRecreateRatsnest )
m_Pcb->GetConnectivity()->Update( aModule ); m_Pcb->GetConnectivity()->Update( aModule );
if( ( GetBoard()->IsElementVisible( LAYER_RATSNEST ) || displ_opts->m_Show_Module_Ratsnest ) if( aRecreateRatsnest )
&& aRecreateRatsnest )
Compile_Ratsnest( true ); Compile_Ratsnest( true );
SetMsgPanel( aModule ); SetMsgPanel( aModule );

View File

@ -59,6 +59,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// //
CONDITIONAL_MENU* fileMenu = new CONDITIONAL_MENU( false, selTool ); CONDITIONAL_MENU* fileMenu = new CONDITIONAL_MENU( false, selTool );
static ACTION_MENU* openRecentMenu; static ACTION_MENU* openRecentMenu;
auto disp_opt = static_cast<PCB_DISPLAY_OPTIONS*>( GetDisplayOptions() );
if( Kiface().IsSingle() ) // not when under a project mgr if( Kiface().IsSingle() ) // not when under a project mgr
{ {
@ -266,35 +267,35 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
auto fullCrosshairCondition = [ this ] ( const SELECTION& aSel ) { auto fullCrosshairCondition = [ this ] ( const SELECTION& aSel ) {
return GetGalDisplayOptions().m_fullscreenCursor; return GetGalDisplayOptions().m_fullscreenCursor;
}; };
auto ratsnestShownCondition = [ this ] ( const SELECTION& aSel ) { auto ratsnestShownCondition = [ this, disp_opt ] ( const SELECTION& aSel ) {
return GetBoard()->IsElementVisible( LAYER_RATSNEST ); return disp_opt->m_ShowGlobalRatsnest;
}; };
auto curvedRatsnestCondition = [ this ] ( const SELECTION& aSel ) { auto curvedRatsnestCondition = [ this, disp_opt ] ( const SELECTION& aSel ) {
return ( (PCB_DISPLAY_OPTIONS*) GetDisplayOptions() )->m_DisplayRatsnestLinesCurved; return disp_opt->m_DisplayRatsnestLinesCurved;
}; };
auto boardFlippedCondition = [ this ] ( const SELECTION& aSel ) { auto boardFlippedCondition = [ this ] ( const SELECTION& aSel ) {
return GetGalCanvas()->GetView()->IsMirroredX(); return GetGalCanvas()->GetView()->IsMirroredX();
}; };
auto zonesFilledCondition = [ this ] ( const SELECTION& aSel ) { auto zonesFilledCondition = [ this, disp_opt ] ( const SELECTION& aSel ) {
return ( (PCB_DISPLAY_OPTIONS*) GetDisplayOptions() )->m_DisplayZonesMode == 0; return disp_opt->m_DisplayZonesMode == 0;
}; };
auto zonesWireframedCondition = [ this ] ( const SELECTION& aSel ) { auto zonesWireframedCondition = [ this, disp_opt ] ( const SELECTION& aSel ) {
return ( (PCB_DISPLAY_OPTIONS*) GetDisplayOptions() )->m_DisplayZonesMode == 1; return disp_opt->m_DisplayZonesMode == 1;
}; };
auto zonesOutlinedCondition = [ this ] ( const SELECTION& aSel ) { auto zonesOutlinedCondition = [ this, disp_opt ] ( const SELECTION& aSel ) {
return ( (PCB_DISPLAY_OPTIONS*) GetDisplayOptions() )->m_DisplayZonesMode == 2; return disp_opt->m_DisplayZonesMode == 2;
}; };
auto sketchTracksCondition = [ this ] ( const SELECTION& aSel ) { auto sketchTracksCondition = [ this, disp_opt ] ( const SELECTION& aSel ) {
return !( (PCB_DISPLAY_OPTIONS*) GetDisplayOptions() )->m_DisplayPcbTrackFill; return !disp_opt->m_DisplayPcbTrackFill;
}; };
auto sketchViasCondition = [ this ] ( const SELECTION& aSel ) { auto sketchViasCondition = [ this, disp_opt ] ( const SELECTION& aSel ) {
return !( (PCB_DISPLAY_OPTIONS*) GetDisplayOptions() )->m_DisplayViaFill; return !disp_opt->m_DisplayViaFill;
}; };
auto sketchPadsCondition = [ this ] ( const SELECTION& aSel ) { auto sketchPadsCondition = [ this, disp_opt ] ( const SELECTION& aSel ) {
return !( (PCB_DISPLAY_OPTIONS*) GetDisplayOptions() )->m_DisplayPadFill; return !disp_opt->m_DisplayPadFill;
}; };
auto contrastModeCondition = [ this ] ( const SELECTION& aSel ) { auto contrastModeCondition = [ this, disp_opt ] ( const SELECTION& aSel ) {
return !( (PCB_DISPLAY_OPTIONS*) GetDisplayOptions() )->m_ContrastModeDisplay; return !disp_opt->m_ContrastModeDisplay;
}; };
viewMenu->AddCheckItem( PCB_ACTIONS::showLayersManager, layersPaletteShownCondition ); viewMenu->AddCheckItem( PCB_ACTIONS::showLayersManager, layersPaletteShownCondition );

View File

@ -52,7 +52,8 @@ PCB_DISPLAY_OPTIONS::PCB_DISPLAY_OPTIONS()
* 3 show netnames on tracks and pads */ * 3 show netnames on tracks and pads */
m_DisplayDrawItemsFill = FILLED; m_DisplayDrawItemsFill = FILLED;
m_ContrastModeDisplay = false; m_ContrastModeDisplay = false;
m_MaxLinksShowed = 3; // in track creation: number of hairwires shown m_MaxLinksShowed = 3; // in track creation: number of hairwires shown
m_Show_Module_Ratsnest = true; // When moving a footprint: allows displaying a ratsnest m_ShowModuleRatsnest = true; // When moving a footprint: allows displaying a ratsnest
m_DisplayRatsnestLinesCurved = false; m_DisplayRatsnestLinesCurved = false;
m_ShowGlobalRatsnest = true;
} }

View File

@ -661,14 +661,11 @@ void PCB_EDIT_FRAME::onBoardLoaded()
syncLayerWidgetLayer(); syncLayerWidgetLayer();
syncRenderStates(); syncRenderStates();
SetElementVisibility( LAYER_RATSNEST,
static_cast<PCB_DISPLAY_OPTIONS*>( GetDisplayOptions() )->m_ShowGlobalRatsnest );
// Update the tracks / vias available sizes list: // Update the tracks / vias available sizes list:
ReCreateAuxiliaryToolbar(); ReCreateAuxiliaryToolbar();
// Update the RATSNEST items, which were not loaded at the time
// BOARD::SetVisibleElements() was called from within any PLUGIN.
// See case LAYER_RATSNEST: in BOARD::SetElementVisibility()
GetBoard()->SetVisibleElements( GetBoard()->GetVisibleElements() );
// Display the loaded board: // Display the loaded board:
Zoom_Automatique( false ); Zoom_Automatique( false );
@ -713,7 +710,12 @@ bool PCB_EDIT_FRAME::IsElementVisible( GAL_LAYER_ID aElement ) const
void PCB_EDIT_FRAME::SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState ) void PCB_EDIT_FRAME::SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState )
{ {
GetGalCanvas()->GetView()->SetLayerVisible( aElement , aNewState ); // Force the RATSNEST visible
if( aElement == LAYER_RATSNEST )
GetGalCanvas()->GetView()->SetLayerVisible( aElement, true );
else
GetGalCanvas()->GetView()->SetLayerVisible( aElement , aNewState );
GetBoard()->SetElementVisibility( aElement, aNewState ); GetBoard()->SetElementVisibility( aElement, aNewState );
m_Layers->SetRenderState( aElement, aNewState ); m_Layers->SetRenderState( aElement, aNewState );
} }

View File

@ -50,7 +50,6 @@ PCB_GENERAL_SETTINGS::PCB_GENERAL_SETTINGS( FRAME_T aFrameType )
case FRAME_PCB_MODULE_EDITOR: case FRAME_PCB_MODULE_EDITOR:
Add( "Use45DegreeGraphicSegments", &g_Use45DegreeGraphicSegments, false); Add( "Use45DegreeGraphicSegments", &g_Use45DegreeGraphicSegments, false);
Add( "MagneticPads", reinterpret_cast<int*>( &g_MagneticPads ), CAPTURE_CURSOR_IN_TRACK_TOOL ); Add( "MagneticPads", reinterpret_cast<int*>( &g_MagneticPads ), CAPTURE_CURSOR_IN_TRACK_TOOL );
Add( "DragSelects", &g_DragSelects, true );
break; break;
default: default:

View File

@ -45,6 +45,7 @@
#include <menus_helpers.h> #include <menus_helpers.h>
#include <gal/graphics_abstraction_layer.h> #include <gal/graphics_abstraction_layer.h>
#include <pcb_painter.h> #include <pcb_painter.h>
#include <pcb_view.h>
#include <class_board.h> #include <class_board.h>
#include <pcb_layer_widget.h> #include <pcb_layer_widget.h>
#include <pcbnew.h> #include <pcbnew.h>
@ -406,10 +407,16 @@ void PCB_LAYER_WIDGET::ReFillRender()
if( renderRow.color != COLOR4D::UNSPECIFIED ) // does this row show a color? if( renderRow.color != COLOR4D::UNSPECIFIED ) // does this row show a color?
{ {
// this window frame must have an established BOARD, i.e. after SetBoard() // this window frame must have an established BOARD, i.e. after SetBoard()
renderRow.color = myframe->Settings().Colors().GetItemColor( static_cast<GAL_LAYER_ID>( renderRow.id ) ); renderRow.color = myframe->Settings().Colors().GetItemColor(
static_cast<GAL_LAYER_ID>( renderRow.id ) );
} }
renderRow.state = board->IsElementVisible( static_cast<GAL_LAYER_ID>( renderRow.id ) ); if( renderRow.id == LAYER_RATSNEST )
renderRow.state =
static_cast<PCB_DISPLAY_OPTIONS*>( myframe->GetDisplayOptions() )->m_ShowGlobalRatsnest;
else
renderRow.state = board->IsElementVisible(
static_cast<GAL_LAYER_ID>( renderRow.id ) );
} }
AppendRenderRow( renderRow ); AppendRenderRow( renderRow );
@ -709,6 +716,13 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
// don't touch the layers. ratsnest is enabled on per-item basis. // don't touch the layers. ratsnest is enabled on per-item basis.
galCanvas->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); galCanvas->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
galCanvas->GetView()->SetLayerVisible( aId, true ); galCanvas->GetView()->SetLayerVisible( aId, true );
if( myframe->IsType( FRAME_PCB ) )
{
auto opt = static_cast<PCB_DISPLAY_OPTIONS*>( myframe->GetDisplayOptions() );
opt->m_ShowGlobalRatsnest = isEnabled;
static_cast<KIGFX::PCB_VIEW*>( galCanvas->GetView() )->UpdateDisplayOptions( opt );
}
} }
else else
galCanvas->GetView()->SetLayerVisible( aId, isEnabled ); galCanvas->GetView()->SetLayerVisible( aId, isEnabled );

View File

@ -139,6 +139,7 @@ void PCB_RENDER_SETTINGS::LoadDisplayOptions( const PCB_DISPLAY_OPTIONS* aOption
m_sketchFpGfx = !aOptions->m_DisplayModEdgeFill; m_sketchFpGfx = !aOptions->m_DisplayModEdgeFill;
m_sketchFpTxtfx = !aOptions->m_DisplayModTextFill; m_sketchFpTxtfx = !aOptions->m_DisplayModTextFill;
m_curvedRatsnestlines = aOptions->m_DisplayRatsnestLinesCurved; m_curvedRatsnestlines = aOptions->m_DisplayRatsnestLinesCurved;
m_globalRatsnestlines = aOptions->m_ShowGlobalRatsnest;
// Whether to draw tracks, vias & pads filled or as outlines // Whether to draw tracks, vias & pads filled or as outlines
m_sketchMode[LAYER_PADS_TH] = !aOptions->m_DisplayPadFill; m_sketchMode[LAYER_PADS_TH] = !aOptions->m_DisplayPadFill;

View File

@ -166,6 +166,11 @@ public:
return m_curvedRatsnestlines; return m_curvedRatsnestlines;
} }
inline bool GetGlobalRatsnestLinesEnabled() const
{
return m_globalRatsnestlines;
}
protected: protected:
///> Flag determining if items on a given layer should be drawn as an outline or a filled item ///> Flag determining if items on a given layer should be drawn as an outline or a filled item
bool m_sketchMode[GAL_LAYER_ID_END]; bool m_sketchMode[GAL_LAYER_ID_END];
@ -197,6 +202,9 @@ protected:
///> Flag determining if ratsnest lines should be drawn curved ///> Flag determining if ratsnest lines should be drawn curved
bool m_curvedRatsnestlines = true; bool m_curvedRatsnestlines = true;
///> Flag determining if ratsnest lines are shown by default
bool m_globalRatsnestlines = true;
///> Maximum font size for netnames (and other dynamically shown strings) ///> Maximum font size for netnames (and other dynamically shown strings)
static const double MAX_FONT_SIZE; static const double MAX_FONT_SIZE;

View File

@ -177,6 +177,10 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings()
&displ_opts->m_DisplayZonesMode, 0, 0, 2 ) ); &displ_opts->m_DisplayZonesMode, 0, 0, 2 ) );
m_configParams.push_back( new PARAM_CFG_BOOL( true, wxT( "CurvedRatsnestLines" ), m_configParams.push_back( new PARAM_CFG_BOOL( true, wxT( "CurvedRatsnestLines" ),
&displ_opts->m_DisplayRatsnestLinesCurved, false ) ); &displ_opts->m_DisplayRatsnestLinesCurved, false ) );
m_configParams.push_back( new PARAM_CFG_BOOL( true, wxT( "ShowRatsnestLines" ),
&displ_opts->m_ShowGlobalRatsnest, true) );
m_configParams.push_back( new PARAM_CFG_BOOL( true, wxT( "ShowRatsnestModuleLines" ),
&displ_opts->m_ShowModuleRatsnest, true) );
// Miscellaneous: // Miscellaneous:
m_configParams.push_back( new PARAM_CFG_INT( true, wxT( "RotationAngle" ), m_configParams.push_back( new PARAM_CFG_INT( true, wxT( "RotationAngle" ),

View File

@ -126,11 +126,11 @@ void RATSNEST_VIEWITEM::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
bool enable = !sourceNode->GetNoLine() && !targetNode->GetNoLine(); bool enable = !sourceNode->GetNoLine() && !targetNode->GetNoLine();
bool show; bool show;
// If the ratsnest layer is currently enabled, the local ratsnest // If the global ratsnest is currently enabled, the local ratsnest
// should be easy to turn off, so either element can disable it // should be easy to turn off, so either element can disable it
// If the layer is off, the local ratsnest should be easy to turn on // If the global ratsnest is disabled, the local ratsnest should be easy to turn on
// so either element can enable it. // so either element can enable it.
if( sourceNode->Parent()->GetBoard()->IsElementVisible( LAYER_RATSNEST ) ) if( rs->GetGlobalRatsnestLinesEnabled() )
show = sourceNode->Parent()->GetLocalRatsnestVisible() && show = sourceNode->Parent()->GetLocalRatsnestVisible() &&
targetNode->Parent()->GetLocalRatsnestVisible(); targetNode->Parent()->GetLocalRatsnestVisible();
else else

View File

@ -699,7 +699,6 @@ void PCB_EDIT_FRAME::SyncToolbars()
PCB_DISPLAY_OPTIONS* opts = (PCB_DISPLAY_OPTIONS*) GetDisplayOptions(); PCB_DISPLAY_OPTIONS* opts = (PCB_DISPLAY_OPTIONS*) GetDisplayOptions();
KIGFX::GAL_DISPLAY_OPTIONS& galOpts = GetGalDisplayOptions(); KIGFX::GAL_DISPLAY_OPTIONS& galOpts = GetGalDisplayOptions();
int zoneMode = opts->m_DisplayZonesMode; int zoneMode = opts->m_DisplayZonesMode;
bool ratsnestShown = GetBoard()->IsElementVisible( LAYER_RATSNEST );
m_mainToolBar->Toggle( ACTIONS::save, GetScreen() && GetScreen()->IsModify() ); m_mainToolBar->Toggle( ACTIONS::save, GetScreen() && GetScreen()->IsModify() );
m_mainToolBar->Toggle( ACTIONS::undo, GetScreen() && GetScreen()->GetUndoCommandCount() > 0 ); m_mainToolBar->Toggle( ACTIONS::undo, GetScreen() && GetScreen()->GetUndoCommandCount() > 0 );
@ -721,7 +720,7 @@ void PCB_EDIT_FRAME::SyncToolbars()
m_optionsToolBar->Toggle( ACTIONS::imperialUnits, GetUserUnits() == INCHES ); m_optionsToolBar->Toggle( ACTIONS::imperialUnits, GetUserUnits() == INCHES );
m_optionsToolBar->Toggle( ACTIONS::togglePolarCoords, GetShowPolarCoords() ); m_optionsToolBar->Toggle( ACTIONS::togglePolarCoords, GetShowPolarCoords() );
m_optionsToolBar->Toggle( ACTIONS::toggleCursorStyle, !galOpts.m_fullscreenCursor ); m_optionsToolBar->Toggle( ACTIONS::toggleCursorStyle, !galOpts.m_fullscreenCursor );
m_optionsToolBar->Toggle( PCB_ACTIONS::showRatsnest, ratsnestShown ); m_optionsToolBar->Toggle( PCB_ACTIONS::showRatsnest, opts->m_ShowGlobalRatsnest );
m_optionsToolBar->Toggle( PCB_ACTIONS::ratsnestLineMode, opts->m_DisplayRatsnestLinesCurved ); m_optionsToolBar->Toggle( PCB_ACTIONS::ratsnestLineMode, opts->m_DisplayRatsnestLinesCurved );
m_optionsToolBar->Toggle( PCB_ACTIONS::showLayersManager, LayerManagerShown() ); m_optionsToolBar->Toggle( PCB_ACTIONS::showLayersManager, LayerManagerShown() );
m_optionsToolBar->Toggle( PCB_ACTIONS::showMicrowaveToolbar, MicrowaveToolbarShown() ); m_optionsToolBar->Toggle( PCB_ACTIONS::showMicrowaveToolbar, MicrowaveToolbarShown() );

View File

@ -633,7 +633,6 @@ bool EDIT_TOOL::changeTrackWidthOnClick( const PCBNEW_SELECTION& selection )
int EDIT_TOOL::Properties( const TOOL_EVENT& aEvent ) int EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
{ {
PCB_BASE_EDIT_FRAME* editFrame = getEditFrame<PCB_BASE_EDIT_FRAME>(); PCB_BASE_EDIT_FRAME* editFrame = getEditFrame<PCB_BASE_EDIT_FRAME>();
VECTOR2I originalCursorPos = getViewControls()->GetCursorPosition();
m_selectionTool->ClearIfOutside( getViewControls()->GetCursorPosition() ); m_selectionTool->ClearIfOutside( getViewControls()->GetCursorPosition() );

View File

@ -1388,7 +1388,7 @@ int PCB_EDITOR_CONTROL::HighlightNetCursor( const TOOL_EVENT& aEvent )
} }
static bool showLocalRatsnest( TOOL_MANAGER* aToolMgr, BOARD* aBoard, const VECTOR2D& aPosition ) static bool showLocalRatsnest( TOOL_MANAGER* aToolMgr, BOARD* aBoard, bool aShow, const VECTOR2D& aPosition )
{ {
auto selectionTool = aToolMgr->GetTool<SELECTION_TOOL>(); auto selectionTool = aToolMgr->GetTool<SELECTION_TOOL>();
@ -1408,7 +1408,7 @@ static bool showLocalRatsnest( TOOL_MANAGER* aToolMgr, BOARD* aBoard, const VECT
for( auto mod : aBoard->Modules() ) for( auto mod : aBoard->Modules() )
{ {
for( auto pad : mod->Pads() ) for( auto pad : mod->Pads() )
pad->SetLocalRatsnestVisible( aBoard->IsElementVisible( LAYER_RATSNEST ) ); pad->SetLocalRatsnestVisible( aShow );
} }
} }
else else
@ -1443,20 +1443,20 @@ int PCB_EDITOR_CONTROL::LocalRatsnestTool( const TOOL_EVENT& aEvent )
auto picker = m_toolMgr->GetTool<PCBNEW_PICKER_TOOL>(); auto picker = m_toolMgr->GetTool<PCBNEW_PICKER_TOOL>();
auto board = getModel<BOARD>(); auto board = getModel<BOARD>();
auto opt = displayOptions();
wxASSERT( picker ); wxASSERT( picker );
wxASSERT( board ); wxASSERT( board );
m_frame->SetToolID( ID_LOCAL_RATSNEST_BUTT, wxCURSOR_PENCIL, m_frame->SetToolID( ID_LOCAL_RATSNEST_BUTT, wxCURSOR_PENCIL,
_( "Pick Components for Local Ratsnest" ) ); _( "Pick Components for Local Ratsnest" ) );
picker->SetClickHandler( std::bind( showLocalRatsnest, m_toolMgr, board, _1 ) ); picker->SetClickHandler( std::bind(
picker->SetFinalizeHandler( [ board ]( int aCondition ){ showLocalRatsnest, m_toolMgr, board, opt->m_ShowGlobalRatsnest, _1 ) );
auto vis = board->IsElementVisible( LAYER_RATSNEST ); picker->SetFinalizeHandler( [ board, opt ]( int aCondition ){
if( aCondition != PCBNEW_PICKER_TOOL::END_ACTIVATE ) if( aCondition != PCBNEW_PICKER_TOOL::END_ACTIVATE )
{ {
for( auto mod : board->Modules() ) for( auto mod : board->Modules() )
for( auto pad : mod->Pads() ) for( auto pad : mod->Pads() )
pad->SetLocalRatsnestVisible( vis ); pad->SetLocalRatsnestVisible( opt->m_ShowGlobalRatsnest );
} }
} ); } );
@ -1533,7 +1533,9 @@ void PCB_EDITOR_CONTROL::calculateSelectionRatsnest()
{ {
auto board_item = static_cast<BOARD_CONNECTED_ITEM*>( item ); auto board_item = static_cast<BOARD_CONNECTED_ITEM*>( item );
if( board_item->Type() != PCB_MODULE_T && board_item->GetLocalRatsnestVisible() ) if( board_item->Type() != PCB_MODULE_T
&& ( board_item->GetLocalRatsnestVisible()
|| displayOptions()->m_ShowModuleRatsnest ) )
{ {
items.push_back( board_item ); items.push_back( board_item );
} }
@ -1541,7 +1543,7 @@ void PCB_EDITOR_CONTROL::calculateSelectionRatsnest()
{ {
for( auto pad : static_cast<MODULE*>( item )->Pads() ) for( auto pad : static_cast<MODULE*>( item )->Pads() )
{ {
if( pad->GetLocalRatsnestVisible() ) if( pad->GetLocalRatsnestVisible() || displayOptions()->m_ShowModuleRatsnest )
items.push_back( pad ); items.push_back( pad );
} }
} }

View File

@ -290,8 +290,12 @@ int PCBNEW_CONTROL::ToggleRatsnest( const TOOL_EVENT& aEvent )
if( aEvent.IsAction( &PCB_ACTIONS::showRatsnest ) ) if( aEvent.IsAction( &PCB_ACTIONS::showRatsnest ) )
{ {
PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) m_frame; // N.B. Do not disable the Ratsnest layer here. We use it for local ratsnest
frame->SetElementVisibility( LAYER_RATSNEST, !frame->IsElementVisible( LAYER_RATSNEST ) ); Flip( opts->m_ShowGlobalRatsnest );
view()->UpdateDisplayOptions( opts );
getEditFrame<PCB_EDIT_FRAME>()->SetElementVisibility( LAYER_RATSNEST,
opts->m_ShowGlobalRatsnest );
} }
else if( aEvent.IsAction( &PCB_ACTIONS::ratsnestLineMode ) ) else if( aEvent.IsAction( &PCB_ACTIONS::ratsnestLineMode ) )
{ {