diff --git a/eeschema/dialogs/panel_eeschema_editing_options.cpp b/eeschema/dialogs/panel_eeschema_editing_options.cpp index b195ec83ed..07f8c70052 100644 --- a/eeschema/dialogs/panel_eeschema_editing_options.cpp +++ b/eeschema/dialogs/panel_eeschema_editing_options.cpp @@ -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; } diff --git a/eeschema/dialogs/panel_eeschema_editing_options_base.cpp b/eeschema/dialogs/panel_eeschema_editing_options_base.cpp index ba4c386ad9..66c5dc8ab9 100644 --- a/eeschema/dialogs/panel_eeschema_editing_options_base.cpp +++ b/eeschema/dialogs/panel_eeschema_editing_options_base.cpp @@ -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, _(" clears net highlighting"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbAutoStartWires->SetToolTip( _("First in selection tool clears selection, next clears net highlighting") ); + + sbSizerEditOpt->Add( m_escClearsNetHighlight, 0, wxALL, 5 ); bLeftColumn->Add( sbSizerEditOpt, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); diff --git a/eeschema/dialogs/panel_eeschema_editing_options_base.fbp b/eeschema/dialogs/panel_eeschema_editing_options_base.fbp index b6ee6a17b8..0a0de137bc 100644 --- a/eeschema/dialogs/panel_eeschema_editing_options_base.fbp +++ b/eeschema/dialogs/panel_eeschema_editing_options_base.fbp @@ -81,7 +81,7 @@ none 5 - wxALL + wxLEFT|wxRIGHT|wxBOTTOM 0 1 @@ -336,6 +336,71 @@ + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + <ESC> clears net highlighting + + 0 + + + 0 + + 1 + m_escClearsNetHighlight + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + First <ESC> in selection tool clears selection, next clears net highlighting + + wxFILTER_NONE + wxDefaultValidator + + + + + + diff --git a/eeschema/dialogs/panel_eeschema_editing_options_base.h b/eeschema/dialogs/panel_eeschema_editing_options_base.h index 424333f887..98ca17595e 100644 --- a/eeschema/dialogs/panel_eeschema_editing_options_base.h +++ b/eeschema/dialogs/panel_eeschema_editing_options_base.h @@ -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; diff --git a/eeschema/eeschema_settings.cpp b/eeschema/eeschema_settings.cpp index 2de09eb4c0..edff33bef2 100644 --- a/eeschema/eeschema_settings.cpp +++ b/eeschema/eeschema_settings.cpp @@ -200,6 +200,9 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() : m_params.emplace_back( new PARAM( "input.drag_is_move", &m_Input.drag_is_move, false ) ); + m_params.emplace_back( new PARAM( "input.esc_clears_net_highlight", + &m_Input.esc_clears_net_highlight, true ) ); + m_params.emplace_back( new PARAM( "selection.thickness", &m_Selection.selection_thickness, 3 ) ); diff --git a/eeschema/eeschema_settings.h b/eeschema/eeschema_settings.h index b91e03a764..81e0bdd938 100644 --- a/eeschema/eeschema_settings.h +++ b/eeschema/eeschema_settings.h @@ -137,6 +137,7 @@ public: struct INPUT { bool drag_is_move; + bool esc_clears_net_highlight; }; struct SELECTION diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index 5cd607ec8d..aa349585cc 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -576,7 +576,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) { SCH_EDITOR_CONTROL* editor = m_toolMgr->GetTool(); - if( editor ) + if( editor && m_frame->eeconfig()->m_Input.esc_clears_net_highlight ) editor->ClearHighlight( *evt ); } }