Add preference for esc-clears-net-highlighting.
Fixes https://gitlab.com/kicad/code/kicad/issues/8760
This commit is contained in:
parent
bf5e649e44
commit
0d5302f375
|
@ -74,6 +74,7 @@ void PANEL_EESCHEMA_EDITING_OPTIONS::loadEEschemaSettings( EESCHEMA_SETTINGS* aC
|
|||
m_cbPinSelectionOpt->SetValue( aCfg->m_Selection.select_pin_selects_symbol );
|
||||
|
||||
m_cbAutoStartWires->SetValue( aCfg->m_Drawing.auto_start_wires );
|
||||
m_escClearsNetHighlight->SetValue( aCfg->m_Input.esc_clears_net_highlight );
|
||||
}
|
||||
|
||||
|
||||
|
@ -111,6 +112,7 @@ bool PANEL_EESCHEMA_EDITING_OPTIONS::TransferDataFromWindow()
|
|||
cfg->m_Selection.select_pin_selects_symbol = m_cbPinSelectionOpt->GetValue();
|
||||
|
||||
cfg->m_Drawing.auto_start_wires = m_cbAutoStartWires->GetValue();
|
||||
cfg->m_Input.esc_clears_net_highlight = m_escClearsNetHighlight->GetValue();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ PANEL_EESCHEMA_EDITING_OPTIONS_BASE::PANEL_EESCHEMA_EDITING_OPTIONS_BASE( wxWind
|
|||
|
||||
m_staticText24 = new wxStaticText( sbSizerEditOpt->GetStaticBox(), wxID_ANY, _("Line Drawing Mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText24->Wrap( -1 );
|
||||
sbSizerEditOpt->Add( m_staticText24, 0, wxALL, 5 );
|
||||
sbSizerEditOpt->Add( m_staticText24, 0, wxLEFT|wxRIGHT|wxBOTTOM, 5 );
|
||||
|
||||
wxString m_choiceLineModeChoices[] = { _("Free Angle"), _("90 deg Angle"), _("45 deg Angle") };
|
||||
int m_choiceLineModeNChoices = sizeof( m_choiceLineModeChoices ) / sizeof( wxString );
|
||||
|
@ -38,7 +38,12 @@ PANEL_EESCHEMA_EDITING_OPTIONS_BASE::PANEL_EESCHEMA_EDITING_OPTIONS_BASE( wxWind
|
|||
m_cbAutoStartWires = new wxCheckBox( sbSizerEditOpt->GetStaticBox(), wxID_ANY, _("Automatically start wires on unconnected pins"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cbAutoStartWires->SetToolTip( _("When enabled, you can start wiring by clicking on unconnected pins even when the wire tool is not active") );
|
||||
|
||||
sbSizerEditOpt->Add( m_cbAutoStartWires, 0, wxALL, 5 );
|
||||
sbSizerEditOpt->Add( m_cbAutoStartWires, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
m_escClearsNetHighlight = new wxCheckBox( sbSizerEditOpt->GetStaticBox(), wxID_ANY, _("<ESC> clears net highlighting"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cbAutoStartWires->SetToolTip( _("First <ESC> in selection tool clears selection, next clears net highlighting") );
|
||||
|
||||
sbSizerEditOpt->Add( m_escClearsNetHighlight, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bLeftColumn->Add( sbSizerEditOpt, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT|wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -336,6 +336,71 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT|wxTOP</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="drag_accept_files">0</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"><ESC> clears net highlighting</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_escClearsNetHighlight</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">First <ESC> in selection tool clears selection, next clears net highlighting</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 class="sizeritem" expanded="1">
|
||||
|
|
|
@ -42,6 +42,7 @@ class PANEL_EESCHEMA_EDITING_OPTIONS_BASE : public RESETTABLE_PANEL
|
|||
wxChoice* m_choiceLineMode;
|
||||
wxCheckBox* m_mouseDragIsDrag;
|
||||
wxCheckBox* m_cbAutoStartWires;
|
||||
wxCheckBox* m_escClearsNetHighlight;
|
||||
wxStaticText* m_borderColorLabel;
|
||||
COLOR_SWATCH* m_borderColorSwatch;
|
||||
wxStaticText* m_backgroundColorLabel;
|
||||
|
|
|
@ -200,6 +200,9 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() :
|
|||
m_params.emplace_back( new PARAM<bool>( "input.drag_is_move",
|
||||
&m_Input.drag_is_move, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "input.esc_clears_net_highlight",
|
||||
&m_Input.esc_clears_net_highlight, true ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<int>( "selection.thickness",
|
||||
&m_Selection.selection_thickness, 3 ) );
|
||||
|
||||
|
|
|
@ -137,6 +137,7 @@ public:
|
|||
struct INPUT
|
||||
{
|
||||
bool drag_is_move;
|
||||
bool esc_clears_net_highlight;
|
||||
};
|
||||
|
||||
struct SELECTION
|
||||
|
|
|
@ -576,7 +576,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
SCH_EDITOR_CONTROL* editor = m_toolMgr->GetTool<SCH_EDITOR_CONTROL>();
|
||||
|
||||
if( editor )
|
||||
if( editor && m_frame->eeconfig()->m_Input.esc_clears_net_highlight )
|
||||
editor->ClearHighlight( *evt );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue