Add configuration for cross-probing behavior
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2317
This commit is contained in:
parent
9795d30f12
commit
bd19c580f4
|
@ -99,6 +99,15 @@ APP_SETTINGS_BASE::APP_SETTINGS_BASE( const std::string& aFilename, int aSchemaV
|
|||
m_params.emplace_back( new PARAM<wxString>( "appearance.color_theme", &m_ColorTheme, "user" ) );
|
||||
|
||||
addParamsForWindow( &m_Window, "window" );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>(
|
||||
"cross_probing.center_on_items", &m_CrossProbing.center_on_items, true ) );
|
||||
|
||||
m_params.emplace_back(
|
||||
new PARAM<bool>( "cross_probing.zoom_to_fit", &m_CrossProbing.zoom_to_fit, true ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>(
|
||||
"cross_probing.auto_highlight", &m_CrossProbing.auto_highlight, true ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <eda_dde.h>
|
||||
#include <connection_graph.h>
|
||||
#include <sch_edit_frame.h>
|
||||
#include <eeschema_settings.h>
|
||||
#include <general.h>
|
||||
#include <lib_item.h>
|
||||
#include <lib_pin.h>
|
||||
|
@ -99,6 +100,8 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindComponentAndItem( const wxString& aReference,
|
|||
break;
|
||||
}
|
||||
|
||||
CROSS_PROBING_SETTINGS& crossProbingSettings = m_frame->eeconfig()->m_CrossProbing;
|
||||
|
||||
if( component )
|
||||
{
|
||||
if( *sheetWithComponentFound != m_frame->GetCurrentSheet() )
|
||||
|
@ -112,8 +115,28 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindComponentAndItem( const wxString& aReference,
|
|||
delta = component->GetTransform().TransformCoordinate( pos );
|
||||
pos = delta + component->GetPosition();
|
||||
|
||||
if( crossProbingSettings.center_on_items )
|
||||
{
|
||||
m_frame->GetCanvas()->GetViewControls()->SetCrossHairCursorPosition( pos, false );
|
||||
m_frame->CenterScreen( pos, false );
|
||||
|
||||
if( crossProbingSettings.zoom_to_fit )
|
||||
{
|
||||
EDA_RECT bbox = component->GetBoundingBox();
|
||||
|
||||
wxSize bbSize = bbox.Inflate( bbox.GetWidth() * 0.2f ).GetSize();
|
||||
VECTOR2D screenSize = getView()->GetViewport().GetSize();
|
||||
|
||||
screenSize.x = std::max( 10.0, screenSize.x );
|
||||
screenSize.y = std::max( 10.0, screenSize.y );
|
||||
double ratio = std::max( fabs( bbSize.x / screenSize.x ),
|
||||
fabs( bbSize.y / screenSize.y ) );
|
||||
|
||||
// Try not to zoom on every cross-probe; it gets very noisy
|
||||
if( ratio < 0.1 || ratio > 1.0 )
|
||||
getView()->SetScale( getView()->GetScale() / ratio );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Print diag */
|
||||
|
@ -167,8 +190,13 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
|||
if( idcmd == NULL )
|
||||
return;
|
||||
|
||||
CROSS_PROBING_SETTINGS& crossProbingSettings = eeconfig()->m_CrossProbing;
|
||||
|
||||
if( strcmp( idcmd, "$NET:" ) == 0 )
|
||||
{
|
||||
if( !crossProbingSettings.auto_highlight )
|
||||
return;
|
||||
|
||||
wxString netName = FROM_UTF8( text );
|
||||
|
||||
if( auto sg = Schematic().ConnectionGraph()->FindFirstSubgraphByName( netName ) )
|
||||
|
|
|
@ -60,6 +60,10 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow()
|
|||
m_checkSelFillShapes->SetValue( cfg->m_Selection.fill_shapes );
|
||||
m_selWidthCtrl->SetValue( cfg->m_Selection.thickness );
|
||||
|
||||
m_checkCrossProbeCenter->SetValue( cfg->m_CrossProbing.center_on_items );
|
||||
m_checkCrossProbeZoom->SetValue( cfg->m_CrossProbing.zoom_to_fit );
|
||||
m_checkCrossProbeAutoHighlight->SetValue( cfg->m_CrossProbing.auto_highlight );
|
||||
|
||||
m_galOptsPanel->TransferDataToWindow();
|
||||
|
||||
return true;
|
||||
|
@ -79,6 +83,10 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow()
|
|||
cfg->m_Selection.fill_shapes = m_checkSelFillShapes->GetValue();
|
||||
cfg->m_Selection.thickness = KiROUND( m_selWidthCtrl->GetValue() );
|
||||
|
||||
cfg->m_CrossProbing.center_on_items = m_checkCrossProbeCenter->GetValue();
|
||||
cfg->m_CrossProbing.zoom_to_fit = m_checkCrossProbeZoom->GetValue();
|
||||
cfg->m_CrossProbing.auto_highlight = m_checkCrossProbeAutoHighlight->GetValue();
|
||||
|
||||
// Update canvas
|
||||
m_frame->GetRenderSettings()->m_ShowHiddenPins = m_checkShowHiddenPins->GetValue();
|
||||
m_frame->GetRenderSettings()->m_ShowHiddenText = m_checkShowHiddenFields->GetValue();
|
||||
|
|
|
@ -74,6 +74,26 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( wxWind
|
|||
|
||||
bRightColumn->Add( sbSizer3, 1, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer31;
|
||||
sbSizer31 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Cross-probing") ), wxVERTICAL );
|
||||
|
||||
m_checkCrossProbeCenter = new wxCheckBox( sbSizer31->GetStaticBox(), wxID_ANY, _("Center view on cross-probed items"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkCrossProbeCenter->SetValue(true);
|
||||
sbSizer31->Add( m_checkCrossProbeCenter, 0, wxALL, 5 );
|
||||
|
||||
m_checkCrossProbeZoom = new wxCheckBox( sbSizer31->GetStaticBox(), wxID_ANY, _("Zoom to fit cross-probed items"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkCrossProbeZoom->SetValue(true);
|
||||
sbSizer31->Add( m_checkCrossProbeZoom, 0, wxALL, 5 );
|
||||
|
||||
m_checkCrossProbeAutoHighlight = new wxCheckBox( sbSizer31->GetStaticBox(), wxID_ANY, _("Highlight cross-probed nets"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkCrossProbeAutoHighlight->SetValue(true);
|
||||
m_checkCrossProbeAutoHighlight->SetToolTip( _("Highlight nets when they are highlighted in the PCB editor") );
|
||||
|
||||
sbSizer31->Add( m_checkCrossProbeAutoHighlight, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bRightColumn->Add( sbSizer31, 1, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
|
||||
bPanelSizer->Add( bRightColumn, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
|
|
@ -690,6 +690,212 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Cross-probing</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbSizer31</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">1</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Center view on cross-probed items</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_checkCrossProbeCenter</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">1</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Zoom to fit cross-probed items</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_checkCrossProbeZoom</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">1</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Highlight cross-probed nets</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_checkCrossProbeAutoHighlight</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">Highlight nets when they are highlighted in the PCB editor</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>
|
||||
|
|
|
@ -42,6 +42,9 @@ class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE : public wxPanel
|
|||
wxStaticText* m_selWidthLabel;
|
||||
wxSpinCtrlDouble* m_selWidthCtrl;
|
||||
wxStaticText* m_highlightColorNote;
|
||||
wxCheckBox* m_checkCrossProbeCenter;
|
||||
wxCheckBox* m_checkCrossProbeZoom;
|
||||
wxCheckBox* m_checkCrossProbeAutoHighlight;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -24,6 +24,16 @@
|
|||
#include <gal/color4d.h>
|
||||
#include <settings/json_settings.h>
|
||||
|
||||
/**
|
||||
* Cross-probing behavior
|
||||
*/
|
||||
struct CROSS_PROBING_SETTINGS
|
||||
{
|
||||
bool center_on_items; ///< Automatically pan to cross-probed items
|
||||
bool zoom_to_fit; ///< Zoom to fit items (ignored if center_on_items is off)
|
||||
bool auto_highlight; ///< Automatically turn on highlight mode in the target frame
|
||||
};
|
||||
|
||||
/**
|
||||
* Common cursor settings, available to every frame
|
||||
*/
|
||||
|
@ -128,6 +138,8 @@ public:
|
|||
virtual bool MigrateFromLegacy( wxConfigBase* aCfg ) override;
|
||||
|
||||
public:
|
||||
CROSS_PROBING_SETTINGS m_CrossProbing;
|
||||
|
||||
FIND_REPLACE m_FindReplace;
|
||||
|
||||
GRAPHICS m_Graphics;
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include <pcb_edit_frame.h>
|
||||
#include <pcb_painter.h>
|
||||
#include <pcbnew.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <pgm_base.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/pcb_actions.h>
|
||||
|
@ -74,6 +75,8 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
|||
D_PAD* pad = NULL;
|
||||
BOARD* pcb = GetBoard();
|
||||
|
||||
CROSS_PROBING_SETTINGS& crossProbingSettings = GetPcbNewSettings()->m_CrossProbing;
|
||||
|
||||
KIGFX::VIEW* view = m_toolManager->GetView();
|
||||
KIGFX::RENDER_SETTINGS* renderSettings = view->GetPainter()->GetSettings();
|
||||
|
||||
|
@ -88,6 +91,9 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
|||
|
||||
if( strcmp( idcmd, "$NET:" ) == 0 )
|
||||
{
|
||||
if( !crossProbingSettings.auto_highlight )
|
||||
return;
|
||||
|
||||
wxString net_name = FROM_UTF8( text );
|
||||
|
||||
NETINFO_ITEM* netinfo = pcb->FindNet( net_name );
|
||||
|
@ -103,6 +109,9 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
|||
}
|
||||
if( strcmp( idcmd, "$NETS:" ) == 0 )
|
||||
{
|
||||
if( !crossProbingSettings.auto_highlight )
|
||||
return;
|
||||
|
||||
wxStringTokenizer netsTok = wxStringTokenizer( FROM_UTF8( text ), "," );
|
||||
bool first = true;
|
||||
|
||||
|
@ -235,6 +244,8 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
|||
}
|
||||
};
|
||||
|
||||
if( crossProbingSettings.center_on_items )
|
||||
{
|
||||
for( auto zone : pcb->Zones() )
|
||||
merge_area( zone );
|
||||
|
||||
|
@ -245,12 +256,13 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
|||
for( auto mod_pad : mod->Pads() )
|
||||
merge_area( mod_pad );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
renderSettings->SetHighlight( false );
|
||||
}
|
||||
|
||||
if( bbox.GetWidth() > 0 && bbox.GetHeight() > 0 )
|
||||
if( crossProbingSettings.center_on_items && bbox.GetWidth() > 0 && bbox.GetHeight() > 0 )
|
||||
{
|
||||
auto bbSize = bbox.Inflate( bbox.GetWidth() * 0.2f ).GetSize();
|
||||
auto screenSize = view->ToWorld( GetCanvas()->GetClientSize(), false );
|
||||
|
@ -260,7 +272,7 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
|||
fabs( bbSize.y / screenSize.y ) );
|
||||
|
||||
// Try not to zoom on every cross-probe; it gets very noisy
|
||||
if( ratio < 0.1 || ratio > 1.0 )
|
||||
if( crossProbingSettings.zoom_to_fit && ( ratio < 0.1 || ratio > 1.0 ) )
|
||||
view->SetScale( view->GetScale() / ratio );
|
||||
|
||||
view->SetCenter( bbox.Centre() );
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <pcbnew.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <pcb_display_options.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <config_map.h>
|
||||
#include <panel_display_options.h>
|
||||
#include <pcb_view.h>
|
||||
|
@ -69,6 +70,12 @@ bool PANEL_DISPLAY_OPTIONS::TransferDataToWindow()
|
|||
m_OptDisplayPadNumber->SetValue( displ_opts.m_DisplayPadNum );
|
||||
m_OptDisplayPadNoConn->SetValue( pcbEdit->IsElementVisible( LAYER_NO_CONNECTS ) );
|
||||
m_ShowNetNamesOption->SetSelection( displ_opts.m_DisplayNetNamesMode );
|
||||
|
||||
CROSS_PROBING_SETTINGS& crossProbing = pcbEdit->GetPcbNewSettings()->m_CrossProbing;
|
||||
|
||||
m_checkCrossProbeCenter->SetValue( crossProbing.center_on_items );
|
||||
m_checkCrossProbeZoom->SetValue( crossProbing.zoom_to_fit );
|
||||
m_checkCrossProbeAutoHighlight->SetValue( crossProbing.auto_highlight );
|
||||
}
|
||||
|
||||
m_galOptsPanel->TransferDataToWindow();
|
||||
|
@ -108,6 +115,12 @@ bool PANEL_DISPLAY_OPTIONS::TransferDataFromWindow()
|
|||
pcbEdit->SetDisplayOptions( displ_opts );
|
||||
settings->LoadDisplayOptions( displ_opts, pcbEdit->ShowPageLimits() );
|
||||
pcbEdit->SetElementVisibility( LAYER_RATSNEST, displ_opts.m_ShowGlobalRatsnest );
|
||||
|
||||
CROSS_PROBING_SETTINGS& crossProbing = pcbEdit->GetPcbNewSettings()->m_CrossProbing;
|
||||
|
||||
crossProbing.center_on_items = m_checkCrossProbeCenter->GetValue();
|
||||
crossProbing.zoom_to_fit = m_checkCrossProbeZoom->GetValue();
|
||||
crossProbing.auto_highlight = m_checkCrossProbeAutoHighlight->GetValue();
|
||||
}
|
||||
|
||||
view->RecacheAllItems();
|
||||
|
|
|
@ -70,6 +70,26 @@ PANEL_DISPLAY_OPTIONS_BASE::PANEL_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWind
|
|||
|
||||
pcbOptionsSizer->Add( sbClearance, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer3;
|
||||
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( pcbPage, wxID_ANY, _("Cross-probing") ), wxVERTICAL );
|
||||
|
||||
m_checkCrossProbeCenter = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Center view on cross-probed items"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkCrossProbeCenter->SetValue(true);
|
||||
sbSizer3->Add( m_checkCrossProbeCenter, 0, wxALL, 5 );
|
||||
|
||||
m_checkCrossProbeZoom = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Zoom to fit cross-probed items"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkCrossProbeZoom->SetValue(true);
|
||||
sbSizer3->Add( m_checkCrossProbeZoom, 0, wxALL, 5 );
|
||||
|
||||
m_checkCrossProbeAutoHighlight = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Highlight cross-probed nets"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkCrossProbeAutoHighlight->SetValue(true);
|
||||
m_checkCrossProbeAutoHighlight->SetToolTip( _("Highlight nets when they are highlighted in the schematic editor") );
|
||||
|
||||
sbSizer3->Add( m_checkCrossProbeAutoHighlight, 0, wxALL, 5 );
|
||||
|
||||
|
||||
pcbOptionsSizer->Add( sbSizer3, 1, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
|
||||
pcbPage->SetSizer( pcbOptionsSizer );
|
||||
pcbPage->Layout();
|
||||
|
|
|
@ -452,11 +452,11 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="0">
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Clearance Outlines</property>
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -596,6 +596,212 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Cross-probing</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">1</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Center view on cross-probed items</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_checkCrossProbeCenter</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">1</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Zoom to fit cross-probed items</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_checkCrossProbeZoom</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">1</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Highlight cross-probed nets</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_checkCrossProbeAutoHighlight</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">Highlight nets when they are highlighted in the schematic editor</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>
|
||||
|
|
|
@ -44,6 +44,9 @@ class PANEL_DISPLAY_OPTIONS_BASE : public wxPanel
|
|||
wxCheckBox* m_OptDisplayPadNoConn;
|
||||
wxRadioBox* m_OptDisplayTracksClearance;
|
||||
wxCheckBox* m_OptDisplayPadClearence;
|
||||
wxCheckBox* m_checkCrossProbeCenter;
|
||||
wxCheckBox* m_checkCrossProbeZoom;
|
||||
wxCheckBox* m_checkCrossProbeAutoHighlight;
|
||||
|
||||
public:
|
||||
|
||||
|
|
Loading…
Reference in New Issue