diff --git a/common/layer_id.cpp b/common/layer_id.cpp index 04e5db6cb8..71127c62b8 100644 --- a/common/layer_id.cpp +++ b/common/layer_id.cpp @@ -137,6 +137,7 @@ wxString LayerName( int aLayer ) case LAYER_SHEETLABEL: return _( "Sheet pins" ); case LAYER_NOCONNECT: return _( "No-connect symbols" ); case LAYER_DNP_MARKER: return _( "DNP markers" ); + case LAYER_EXCLUDED_FROM_SIM: return _( "Excluded-from-simulation markers" ); case LAYER_ERC_WARN: return _( "ERC warnings" ); case LAYER_ERC_ERR: return _( "ERC errors" ); case LAYER_ERC_EXCLUSION: return _( "ERC exclusions" ); diff --git a/common/settings/builtin_color_themes.h b/common/settings/builtin_color_themes.h index 250deab90f..a4aff51fea 100644 --- a/common/settings/builtin_color_themes.h +++ b/common/settings/builtin_color_themes.h @@ -37,14 +37,15 @@ static const std::map s_defaultTheme = { LAYER_DEVICE_BACKGROUND, CSS_COLOR( 255, 255, 194, 1 ) }, { LAYER_DEVICE, CSS_COLOR( 132, 0, 0, 1 ) }, { LAYER_SCHEMATIC_CURSOR, CSS_COLOR( 15, 15, 15, 1 ) }, - { LAYER_DNP_MARKER, CSS_COLOR( 220, 9, 13, 0.7 ) }, + { LAYER_DNP_MARKER, CSS_COLOR( 220, 9, 13, 0.85 ) }, + { LAYER_EXCLUDED_FROM_SIM, CSS_COLOR( 194, 194, 194, 0.95 ) }, { LAYER_ERC_ERR, CSS_COLOR( 230, 9, 13, 0.8 ) }, { LAYER_ERC_WARN, CSS_COLOR( 209, 146, 0, 0.8 ) }, - { LAYER_ERC_EXCLUSION, CSS_COLOR( 94, 194, 194, 0.8 ) }, + { LAYER_ERC_EXCLUSION, CSS_COLOR( 194, 194, 194, 0.8 ) }, { LAYER_FIELDS, CSS_COLOR( 132, 0, 132, 1 ) }, { LAYER_SCHEMATIC_GRID, CSS_COLOR( 181, 181, 181, 1 ) }, { LAYER_SCHEMATIC_GRID_AXES, CSS_COLOR( 0, 0, 132, 1 ) }, - { LAYER_HIDDEN, CSS_COLOR( 94, 194, 194, 1 ) }, + { LAYER_HIDDEN, CSS_COLOR( 194, 194, 194, 1 ) }, { LAYER_JUNCTION, CSS_COLOR( 0, 150, 0, 1 ) }, { LAYER_GLOBLABEL, CSS_COLOR( 132, 0, 0, 1 ) }, { LAYER_HIERLABEL, CSS_COLOR( 114, 86, 0, 1 ) }, @@ -256,7 +257,8 @@ static const std::map s_classicTheme = { LAYER_DEVICE_BACKGROUND, COLOR4D( LIGHTYELLOW ) }, { LAYER_DEVICE, COLOR4D( RED ) }, { LAYER_SCHEMATIC_CURSOR, COLOR4D( BLACK ) }, - { LAYER_DNP_MARKER, COLOR4D( PURERED ).WithAlpha( 0.7 ) }, + { LAYER_DNP_MARKER, COLOR4D( PURERED ).WithAlpha( 0.85 ) }, + { LAYER_EXCLUDED_FROM_SIM, COLOR4D( LIGHTGRAY ).WithAlpha( 0.95 ) }, { LAYER_ERC_ERR, COLOR4D( PURERED ).WithAlpha( 0.8 ) }, { LAYER_ERC_WARN, COLOR4D( PUREGREEN ).WithAlpha( 0.8 ) }, { LAYER_ERC_EXCLUSION, COLOR4D( LIGHTGRAY ) }, diff --git a/common/settings/color_settings.cpp b/common/settings/color_settings.cpp index bb37d1fb15..4678b6d389 100644 --- a/common/settings/color_settings.cpp +++ b/common/settings/color_settings.cpp @@ -63,6 +63,7 @@ COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename, bool aAbsolutePath ) CLR( "schematic.component_outline", LAYER_DEVICE ); CLR( "schematic.cursor", LAYER_SCHEMATIC_CURSOR ); CLR( "schematic.dnp_marker", LAYER_DNP_MARKER ); + CLR( "schematic.excluded_from_sim", LAYER_EXCLUDED_FROM_SIM ); CLR( "schematic.erc_error", LAYER_ERC_ERR ); CLR( "schematic.erc_warning", LAYER_ERC_WARN ); CLR( "schematic.erc_exclusion", LAYER_ERC_EXCLUSION ); diff --git a/eeschema/dialogs/panel_eeschema_display_options.cpp b/eeschema/dialogs/panel_eeschema_display_options.cpp index 2656c24ec1..89be768f07 100644 --- a/eeschema/dialogs/panel_eeschema_display_options.cpp +++ b/eeschema/dialogs/panel_eeschema_display_options.cpp @@ -58,6 +58,7 @@ void PANEL_EESCHEMA_DISPLAY_OPTIONS::loadEEschemaSettings( EESCHEMA_SETTINGS* cf m_checkShowERCErrors->SetValue( cfg->m_Appearance.show_erc_errors ); m_checkShowERCWarnings->SetValue( cfg->m_Appearance.show_erc_warnings ); m_checkShowERCExclusions->SetValue( cfg->m_Appearance.show_erc_exclusions ); + m_cbMarkSimExclusions->SetValue( cfg->m_Appearance.mark_sim_exclusions ); m_checkShowOPVoltages->SetValue( cfg->m_Appearance.show_op_voltages ); m_checkShowOPCurrents->SetValue( cfg->m_Appearance.show_op_currents ); m_checkPageLimits->SetValue( cfg->m_Appearance.show_page_limits ); @@ -100,6 +101,7 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow() cfg->m_Appearance.show_erc_warnings = m_checkShowERCWarnings->GetValue(); cfg->m_Appearance.show_erc_errors = m_checkShowERCErrors->GetValue(); cfg->m_Appearance.show_erc_exclusions = m_checkShowERCExclusions->GetValue(); + cfg->m_Appearance.mark_sim_exclusions = m_cbMarkSimExclusions->GetValue(); cfg->m_Appearance.show_op_voltages = m_checkShowOPVoltages->GetValue(); cfg->m_Appearance.show_op_currents = m_checkShowOPCurrents->GetValue(); cfg->m_Appearance.show_page_limits = m_checkPageLimits->GetValue(); diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.cpp b/eeschema/dialogs/panel_eeschema_display_options_base.cpp index 7d97b9ab74..d91e3493e6 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.cpp +++ b/eeschema/dialogs/panel_eeschema_display_options_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -65,6 +65,10 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( wxWind m_checkShowERCExclusions = new wxCheckBox( this, wxID_ANY, _("Show ERC exclusions"), wxDefaultPosition, wxDefaultSize, 0 ); bAppearanceSizer->Add( m_checkShowERCExclusions, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_cbMarkSimExclusions = new wxCheckBox( this, wxID_ANY, _("Mark items which are excluded from simulation"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbMarkSimExclusions->SetValue(true); + bAppearanceSizer->Add( m_cbMarkSimExclusions, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_checkShowOPVoltages = new wxCheckBox( this, wxID_ANY, _("Show OP voltages"), wxDefaultPosition, wxDefaultSize, 0 ); bAppearanceSizer->Add( m_checkShowOPVoltages, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.fbp b/eeschema/dialogs/panel_eeschema_display_options_base.fbp index eca2c87e89..919a58b84d 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.fbp +++ b/eeschema/dialogs/panel_eeschema_display_options_base.fbp @@ -1,1870 +1,1963 @@ - + - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - table - panel_eeschema_display_options_base - 1000 - none - - - 1 - PanelEeschemaDisplayOptions - - . - - 1 - 1 - 1 - 1 - UI - 0 - 1 - 0 - - 0 - wxAUI_MGR_DEFAULT - - - 1 - 1 - impl_virtual - - - 0 - wxID_ANY - + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + table + panel_eeschema_display_options_base + 1000 + none + + + 1 + PanelEeschemaDisplayOptions + + . + + 1 + 1 + 1 + 1 + UI + 0 + 1 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + 1 + 0 + 1 + impl_virtual + + + 0 + wxID_ANY + + + PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE + + -1,-1 + RESETTABLE_PANEL; widgets/resettable_panel.h; Not forward_declare + + 0 + + + wxTAB_TRAVERSAL + + + bPanelSizer + wxHORIZONTAL + none + + 15 + wxEXPAND|wxRIGHT + 0 + - PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE - - -1,-1 - RESETTABLE_PANEL; widgets/resettable_panel.h; Not forward_declare - - 0 - - - wxTAB_TRAVERSAL - - - bPanelSizer - wxHORIZONTAL - none - - 15 - wxEXPAND|wxRIGHT - 0 - - - m_galOptionsSizer - wxVERTICAL - protected - - - - 10 - wxEXPAND|wxBOTTOM|wxLEFT - 0 - - - bRightColumn - wxVERTICAL - none - - 13 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Appearance - 0 - - 0 - - - 0 - - 1 - m_appearanceLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 7 - wxEXPAND|wxBOTTOM - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline1 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - ; ; forward_declare - 0 - - - - - - - - 5 - wxEXPAND|wxTOP|wxLEFT - 0 - - - bAppearanceSizer - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - - bSizer4 - wxHORIZONTAL - none - - 5 - wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Default font: - 0 - - 0 - - - 0 - - 1 - m_defaultFontLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "KiCad Font" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_defaultFontCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - FONT_CHOICE; widgets/font_choice.h; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - 5 - wxEXPAND|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - S&how hidden pins - - 0 - - - 0 - - 1 - m_checkShowHiddenPins - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show hidden fields - - 0 - - - 0 - - 1 - m_checkShowHiddenFields - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show ERC errors - - 0 - - - 0 - - 1 - m_checkShowERCErrors - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show ERC warnings - - 0 - - - 0 - - 1 - m_checkShowERCWarnings - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show ERC exclusions - - 0 - - - 0 - - 1 - m_checkShowERCExclusions - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show OP voltages - - 0 - - - 0 - - 1 - m_checkShowOPVoltages - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show OP currents - - 0 - - - 0 - - 1 - m_checkShowOPCurrents - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show page limi&ts - - 0 - - - 0 - - 1 - m_checkPageLimits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - 5 - wxEXPAND - 0 - - 7 - protected - 0 - - - - 13 - wxTOP|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Selection && Highlighting - 0 - - 0 - - - 0 - - 1 - m_selectionLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 7 - wxEXPAND|wxBOTTOM - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline2 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - ; ; forward_declare - 0 - - - - - - - - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 0 - - - bSelectionSizer - wxVERTICAL - none - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Draw selected child items - - 0 - - - 0 - - 1 - m_checkSelDrawChildItems - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Fill selected shapes - - 0 - - - 0 - - 1 - m_checkSelFillShapes - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxEXPAND|wxRIGHT - 1 - - -1,10 - wxBOTH - - - 0 - - gbSizer1 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - - 5 - 1 - 0 - wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Selection thickness: - 0 - - 0 - - - 0 - - 1 - m_selWidthLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - 1 - 0 - 50 - - 0 - - 0 - - 0 - - 1 - m_selWidthCtrl - 1 - - - protected - 1 - - Resizable - 1 - - wxALIGN_RIGHT|wxSP_ARROW_KEYS - ; ; forward_declare - 0 - - - - - - - - - 5 - 2 - 0 - wxTOP|wxRIGHT|wxLEFT - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - (selection color can be edited in the "Colors" page) - 0 - - 0 - - - 0 - - 1 - m_highlightColorNote - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - 1 - 0 - wxALL|wxALIGN_CENTER_VERTICAL - 3 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Highlight thickness: - 0 - - 0 - - - 0 - - 1 - m_highlightWidthLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxALL|wxALIGN_CENTER_VERTICAL - 3 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - 1 - 0 - 50 - - 0 - - 0 - - 0 - - 1 - m_highlightWidthCtrl - 1 - - - protected - 1 - - Resizable - 1 - - wxALIGN_RIGHT|wxSP_ARROW_KEYS - ; ; forward_declare - 0 - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - 7 - protected - 0 - - - - 13 - wxTOP|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Cross-probing - 0 - - 0 - - - 0 - - 1 - m_crossprobeLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 7 - wxEXPAND|wxBOTTOM - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline3 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - ; ; forward_declare - 0 - - - - - - - - 5 - wxEXPAND|wxTOP|wxLEFT - 0 - - - bCrossProbingSizer - wxVERTICAL - none - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Select/highlight objects corresponding to PCB selection - - 0 - - - 0 - - 1 - m_checkCrossProbeOnSelection - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Highlight symbols corresponding to selected footprints - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Center view on cross-probed items - - 0 - - - 0 - - 1 - m_checkCrossProbeCenter - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Ensures that cross-probed symbols are visible in the current view - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Zoom to fit cross-probed items - - 0 - - - 0 - - 1 - m_checkCrossProbeZoom - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Highlight cross-probed nets - - 0 - - - 0 - - 1 - m_checkCrossProbeAutoHighlight - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Highlight nets when they are highlighted in the PCB editor - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - + m_galOptionsSizer + wxVERTICAL + protected + + + 10 + wxEXPAND|wxBOTTOM|wxLEFT + 0 + + + bRightColumn + wxVERTICAL + none + + 13 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Appearance + 0 + + 0 + + + 0 + + 1 + m_appearanceLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 7 + wxEXPAND|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; ; forward_declare + 0 + + + + + + + + 5 + wxEXPAND|wxTOP|wxLEFT + 0 + + + bAppearanceSizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizer4 + wxHORIZONTAL + none + + 5 + wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Default font: + 0 + + 0 + + + 0 + + 1 + m_defaultFontLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "KiCad Font" + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_defaultFontCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + FONT_CHOICE; widgets/font_choice.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + S&how hidden pins + + 0 + + + 0 + + 1 + m_checkShowHiddenPins + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Show hidden fields + + 0 + + + 0 + + 1 + m_checkShowHiddenFields + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Show ERC errors + + 0 + + + 0 + + 1 + m_checkShowERCErrors + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Show ERC warnings + + 0 + + + 0 + + 1 + m_checkShowERCWarnings + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Show ERC exclusions + + 0 + + + 0 + + 1 + m_checkShowERCExclusions + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Mark items which are excluded from simulation + + 0 + + + 0 + + 1 + m_cbMarkSimExclusions + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Show OP voltages + + 0 + + + 0 + + 1 + m_checkShowOPVoltages + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Show OP currents + + 0 + + + 0 + + 1 + m_checkShowOPCurrents + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Show page limi&ts + + 0 + + + 0 + + 1 + m_checkPageLimits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + 5 + wxEXPAND + 0 + + 7 + protected + 0 + + + + 13 + wxTOP|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Selection && Highlighting + 0 + + 0 + + + 0 + + 1 + m_selectionLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 7 + wxEXPAND|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline2 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; ; forward_declare + 0 + + + + + + + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + + bSelectionSizer + wxVERTICAL + none + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Draw selected child items + + 0 + + + 0 + + 1 + m_checkSelDrawChildItems + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Fill selected shapes + + 0 + + + 0 + + 1 + m_checkSelFillShapes + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxEXPAND|wxRIGHT + 1 + + -1,10 + wxBOTH + + + 0 + + gbSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + + 5 + 1 + 0 + wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Selection thickness: + 0 + + 0 + + + 0 + + 1 + m_selWidthLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + 1 + 0 + 50 + + 0 + + 0 + + 0 + + 1 + m_selWidthCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_RIGHT|wxSP_ARROW_KEYS + ; ; forward_declare + 0 + + + + + + + + + 5 + 2 + 0 + wxTOP|wxRIGHT|wxLEFT + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + (selection color can be edited in the "Colors" page) + 0 + + 0 + + + 0 + + 1 + m_highlightColorNote + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Highlight thickness: + 0 + + 0 + + + 0 + + 1 + m_highlightWidthLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxALL|wxALIGN_CENTER_VERTICAL + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + 1 + 0 + 50 + + 0 + + 0 + + 0 + + 1 + m_highlightWidthCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_RIGHT|wxSP_ARROW_KEYS + ; ; forward_declare + 0 + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 7 + protected + 0 + + + + 13 + wxTOP|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Cross-probing + 0 + + 0 + + + 0 + + 1 + m_crossprobeLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 7 + wxEXPAND|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline3 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; ; forward_declare + 0 + + + + + + + + 5 + wxEXPAND|wxTOP|wxLEFT + 0 + + + bCrossProbingSizer + wxVERTICAL + none + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Select/highlight objects corresponding to PCB selection + + 0 + + + 0 + + 1 + m_checkCrossProbeOnSelection + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Highlight symbols corresponding to selected footprints + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Center view on cross-probed items + + 0 + + + 0 + + 1 + m_checkCrossProbeCenter + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Ensures that cross-probed symbols are visible in the current view + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Zoom to fit cross-probed items + + 0 + + + 0 + + 1 + m_checkCrossProbeZoom + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Highlight cross-probed nets + + 0 + + + 0 + + 1 + m_checkCrossProbeAutoHighlight + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Highlight nets when they are highlighted in the PCB editor + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.h b/eeschema/dialogs/panel_eeschema_display_options_base.h index 9d81725335..5ad2fd4160 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.h +++ b/eeschema/dialogs/panel_eeschema_display_options_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -47,6 +47,7 @@ class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE : public RESETTABLE_PANEL wxCheckBox* m_checkShowERCErrors; wxCheckBox* m_checkShowERCWarnings; wxCheckBox* m_checkShowERCExclusions; + wxCheckBox* m_cbMarkSimExclusions; wxCheckBox* m_checkShowOPVoltages; wxCheckBox* m_checkShowOPCurrents; wxCheckBox* m_checkPageLimits; diff --git a/eeschema/eeschema_settings.cpp b/eeschema/eeschema_settings.cpp index 00e90f6f5c..8a949bcefa 100644 --- a/eeschema/eeschema_settings.cpp +++ b/eeschema/eeschema_settings.cpp @@ -203,6 +203,9 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() : m_params.emplace_back( new PARAM( "appearance.show_erc_exclusions", &m_Appearance.show_erc_exclusions, false ) ); + m_params.emplace_back( new PARAM( "appearance.mark_sim_exclusions", + &m_Appearance.mark_sim_exclusions, true ) ); + m_params.emplace_back( new PARAM( "appearance.show_op_voltages", &m_Appearance.show_op_voltages, true ) ); diff --git a/eeschema/eeschema_settings.h b/eeschema/eeschema_settings.h index 47d90a13e7..0a3051f7f5 100644 --- a/eeschema/eeschema_settings.h +++ b/eeschema/eeschema_settings.h @@ -69,6 +69,7 @@ public: bool show_hidden_pins; bool show_hidden_fields; bool show_directive_labels; + bool mark_sim_exclusions; bool show_erc_warnings; bool show_erc_errors; bool show_erc_exclusions; diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 86413df09c..45a1825643 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -229,6 +229,7 @@ void SCH_EDIT_FRAME::doReCreateMenuBar() viewMenu->Add( EE_ACTIONS::toggleERCErrors, ACTION_MENU::CHECK ); viewMenu->Add( EE_ACTIONS::toggleERCWarnings, ACTION_MENU::CHECK ); viewMenu->Add( EE_ACTIONS::toggleERCExclusions, ACTION_MENU::CHECK ); + viewMenu->Add( EE_ACTIONS::markSimExclusions, ACTION_MENU::CHECK ); viewMenu->Add( EE_ACTIONS::toggleOPVoltages, ACTION_MENU::CHECK ); viewMenu->Add( EE_ACTIONS::toggleOPCurrents, ACTION_MENU::CHECK ); diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 0af05b88ec..7da4a8b455 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -670,6 +670,13 @@ void SCH_EDIT_FRAME::setupUIConditions() return cfg && cfg->m_Appearance.show_erc_exclusions; }; + auto markSimExclusionsCond = + [this]( const SELECTION& ) + { + EESCHEMA_SETTINGS* cfg = eeconfig(); + return cfg && cfg->m_Appearance.mark_sim_exclusions; + }; + auto showOPVoltagesCond = [this]( const SELECTION& ) { @@ -740,6 +747,7 @@ void SCH_EDIT_FRAME::setupUIConditions() mgr->SetConditions( EE_ACTIONS::toggleERCErrors, CHECK( showERCErrorsCond ) ); mgr->SetConditions( EE_ACTIONS::toggleERCWarnings, CHECK( showERCWarningsCond ) ); mgr->SetConditions( EE_ACTIONS::toggleERCExclusions, CHECK( showERCExclusionsCond ) ); + mgr->SetConditions( EE_ACTIONS::markSimExclusions, CHECK( markSimExclusionsCond ) ); mgr->SetConditions( EE_ACTIONS::toggleOPVoltages, CHECK( showOPVoltagesCond ) ); mgr->SetConditions( EE_ACTIONS::toggleOPCurrents, CHECK( showOPCurrentsCond ) ); mgr->SetConditions( EE_ACTIONS::toggleAnnotateAuto, CHECK( showAnnotateAutomaticallyCond ) ); @@ -1489,31 +1497,30 @@ void SCH_EDIT_FRAME::RefreshOperatingPointDisplay() { int flags = 0; + auto invalidateTextVars = + [&flags]( EDA_TEXT* text ) + { + if( text->HasTextVars() ) + { + text->ClearRenderCache(); + text->ClearBoundingBoxCache(); + flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; + } + }; + if( SCH_ITEM* item = dynamic_cast( aItem ) ) { item->RunOnChildren( - [&flags]( SCH_ITEM* aChild ) + [&invalidateTextVars]( SCH_ITEM* aChild ) { - EDA_TEXT* text = dynamic_cast( aChild ); - - if( text && text->HasTextVars() ) - { - text->ClearRenderCache(); - text->ClearBoundingBoxCache(); - flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; - } + if( EDA_TEXT* text = dynamic_cast( aChild ) ) + invalidateTextVars( text ); } ); - - EDA_TEXT* text = dynamic_cast( aItem ); - - if( text && text->HasTextVars() ) - { - text->ClearRenderCache(); - text->ClearBoundingBoxCache(); - flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; - } } + if( EDA_TEXT* text = dynamic_cast( aItem ) ) + invalidateTextVars( text ); + return flags; } ); @@ -1982,6 +1989,17 @@ void SCH_EDIT_FRAME::RecalculateConnections( SCH_COMMIT* aCommit, SCH_CLEANUP_FL SCH_ITEM* item = dynamic_cast( aItem ); SCH_CONNECTION* connection = item ? item->Connection() : nullptr; + auto invalidateTextVars = + [&flags]( EDA_TEXT* text ) + { + if( text->HasTextVars() ) + { + text->ClearRenderCache(); + text->ClearBoundingBoxCache(); + flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; + } + }; + if( connection && connection->HasDriverChanged() ) { connection->ClearDriverChanged(); @@ -1991,31 +2009,19 @@ void SCH_EDIT_FRAME::RecalculateConnections( SCH_COMMIT* aCommit, SCH_CLEANUP_FL if( item ) { item->RunOnChildren( - [&flags]( SCH_ITEM* aChild ) + [&invalidateTextVars]( SCH_ITEM* aChild ) { - EDA_TEXT* text = dynamic_cast( aChild ); - - if( text && text->HasTextVars() ) - { - text->ClearRenderCache(); - text->ClearBoundingBoxCache(); - flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; - } + if( EDA_TEXT* text = dynamic_cast( aChild ) ) + invalidateTextVars( text ); } ); - EDA_TEXT* text = dynamic_cast( aItem ); - - if( text && text->HasTextVars() ) - { - text->ClearRenderCache(); - text->ClearBoundingBoxCache(); - flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; - } - if( flags & KIGFX::GEOMETRY ) GetScreen()->Update( item, false ); // Refresh RTree } + if( EDA_TEXT* text = dynamic_cast( aItem ) ) + invalidateTextVars( text ); + return flags; } ); diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 5317e808f5..5caa119d54 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -2150,6 +2150,9 @@ wxString SCH_PAINTER::expandLibItemTextVars( const wxString& aSourceText, void SCH_PAINTER::draw( const SCH_SYMBOL* aSymbol, int aLayer ) { bool drawingShadows = aLayer == LAYER_SELECTION_SHADOWS; + bool DNP = aSymbol->GetDNP(); + bool markExclusion = eeconfig()->m_Appearance.mark_sim_exclusions + && aSymbol->GetExcludedFromSim(); if( m_schSettings.IsPrinting() && drawingShadows ) return; @@ -2157,7 +2160,7 @@ void SCH_PAINTER::draw( const SCH_SYMBOL* aSymbol, int aLayer ) if( !drawingShadows || eeconfig()->m_Selection.draw_selected_children ) { for( const SCH_FIELD& field : aSymbol->GetFields() ) - draw( &field, aLayer, aSymbol->GetDNP() ); + draw( &field, aLayer, DNP || markExclusion ); } if( isFieldsLayer( aLayer ) ) @@ -2228,7 +2231,8 @@ void SCH_PAINTER::draw( const SCH_SYMBOL* aSymbol, int aLayer ) tempPin->SetOperatingPoint( symbolPin->GetOperatingPoint() ); } - draw( &tempSymbol, aLayer, false, aSymbol->GetUnit(), aSymbol->GetBodyStyle(), aSymbol->GetDNP() ); + draw( &tempSymbol, aLayer, false, aSymbol->GetUnit(), aSymbol->GetBodyStyle(), + DNP || markExclusion ); for( unsigned i = 0; i < tempPins.size(); ++i ) { @@ -2241,12 +2245,14 @@ void SCH_PAINTER::draw( const SCH_SYMBOL* aSymbol, int aLayer ) // IS_SHOWN_AS_BITMAP } - if( aSymbol->GetDNP() ) + if( DNP || markExclusion ) { + int layer = DNP ? LAYER_DNP_MARKER : LAYER_EXCLUDED_FROM_SIM; BOX2I bbox = aSymbol->GetBodyBoundingBox(); BOX2I pins = aSymbol->GetBodyAndPinsBoundingBox(); VECTOR2D margins( std::max( bbox.GetX() - pins.GetX(), pins.GetEnd().x - bbox.GetEnd().x ), std::max( bbox.GetY() - pins.GetY(), pins.GetEnd().y - bbox.GetEnd().y ) ); + int strokeWidth = 3 * schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ); margins.x = std::max( margins.x * 0.6, margins.y * 0.3 ); margins.y = std::max( margins.y * 0.6, margins.x * 0.3 ); @@ -2259,12 +2265,12 @@ void SCH_PAINTER::draw( const SCH_SYMBOL* aSymbol, int aLayer ) m_gal->AdvanceDepth(); m_gal->SetIsStroke( true ); m_gal->SetIsFill( true ); - m_gal->SetStrokeColor( m_schSettings.GetLayerColor( LAYER_DNP_MARKER ) ); - m_gal->SetFillColor( m_schSettings.GetLayerColor( LAYER_DNP_MARKER ) ); + m_gal->SetStrokeColor( m_schSettings.GetLayerColor( layer ) ); + m_gal->SetFillColor( m_schSettings.GetLayerColor( layer ) ); - m_gal->DrawSegment( pt1, pt2, 3.0 * schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ) ); + m_gal->DrawSegment( pt1, pt2, strokeWidth ); std::swap( pt1.x, pt2.x ); - m_gal->DrawSegment( pt1, pt2, 3.0 * schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ) ); + m_gal->DrawSegment( pt1, pt2, strokeWidth ); m_gal->PopDepth(); } } @@ -2668,6 +2674,9 @@ void SCH_PAINTER::draw( const SCH_DIRECTIVE_LABEL* aLabel, int aLayer ) void SCH_PAINTER::draw( const SCH_SHEET* aSheet, int aLayer ) { bool drawingShadows = aLayer == LAYER_SELECTION_SHADOWS; + bool DNP = aSheet->GetDNP(); + bool markExclusion = eeconfig()->m_Appearance.mark_sim_exclusions + && aSheet->GetExcludedFromSim(); if( m_schSettings.IsPrinting() && drawingShadows ) return; @@ -2675,10 +2684,10 @@ void SCH_PAINTER::draw( const SCH_SHEET* aSheet, int aLayer ) if( !drawingShadows || eeconfig()->m_Selection.draw_selected_children ) { for( const SCH_FIELD& field : aSheet->GetFields() ) - draw( &field, aLayer, aSheet->GetDNP() ); + draw( &field, aLayer, DNP || markExclusion ); for( SCH_SHEET_PIN* sheetPin : aSheet->GetPins() ) - draw( static_cast( sheetPin ), aLayer, aSheet->GetDNP() ); + draw( static_cast( sheetPin ), aLayer, DNP || markExclusion ); } if( isFieldsLayer( aLayer ) ) @@ -2711,12 +2720,14 @@ void SCH_PAINTER::draw( const SCH_SHEET* aSheet, int aLayer ) m_gal->DrawRectangle( pos, pos + size ); } - if( aSheet->GetDNP() ) + if( DNP || markExclusion ) { + int layer = DNP ? LAYER_DNP_MARKER : LAYER_EXCLUDED_FROM_SIM; BOX2I bbox = aSheet->GetBodyBoundingBox(); BOX2I pins = aSheet->GetBoundingBox(); VECTOR2D margins( std::max( bbox.GetX() - pins.GetX(), pins.GetEnd().x - bbox.GetEnd().x ), std::max( bbox.GetY() - pins.GetY(), pins.GetEnd().y - bbox.GetEnd().y ) ); + int strokeWidth = 3 * schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ); margins.x = std::max( margins.x * 0.6, margins.y * 0.3 ); margins.y = std::max( margins.y * 0.6, margins.x * 0.3 ); @@ -2729,12 +2740,12 @@ void SCH_PAINTER::draw( const SCH_SHEET* aSheet, int aLayer ) m_gal->AdvanceDepth(); m_gal->SetIsStroke( true ); m_gal->SetIsFill( true ); - m_gal->SetStrokeColor( m_schSettings.GetLayerColor( LAYER_DNP_MARKER ) ); - m_gal->SetFillColor( m_schSettings.GetLayerColor( LAYER_DNP_MARKER ) ); + m_gal->SetStrokeColor( m_schSettings.GetLayerColor( layer ) ); + m_gal->SetFillColor( m_schSettings.GetLayerColor( layer ) ); - m_gal->DrawSegment( pt1, pt2, 3.0 * schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ) ); + m_gal->DrawSegment( pt1, pt2, strokeWidth ); std::swap( pt1.x, pt2.x ); - m_gal->DrawSegment( pt1, pt2, 3.0 * schIUScale.MilsToIU( DEFAULT_LINE_WIDTH_MILS ) ); + m_gal->DrawSegment( pt1, pt2, strokeWidth ); m_gal->PopDepth(); } } diff --git a/eeschema/tools/ee_actions.cpp b/eeschema/tools/ee_actions.cpp index 03cefffa9b..826848aadf 100644 --- a/eeschema/tools/ee_actions.cpp +++ b/eeschema/tools/ee_actions.cpp @@ -1185,6 +1185,12 @@ TOOL_ACTION EE_ACTIONS::toggleERCExclusions( TOOL_ACTION_ARGS() .FriendlyName( _( "Show ERC Exclusions" ) ) .Tooltip( _( "Show markers for excluded electrical rules checker violations" ) ) ); +TOOL_ACTION EE_ACTIONS::markSimExclusions( TOOL_ACTION_ARGS() + .Name( "eeschema.EditorControl.markSimExclusions" ) + .Scope( AS_GLOBAL ) + .FriendlyName( _( "Mark items excluded from simulation" ) ) + .Tooltip( _( "Draw 'X's over items which have been excluded from simulation" ) ) ); + TOOL_ACTION EE_ACTIONS::toggleOPVoltages( TOOL_ACTION_ARGS() .Name( "eeschema.EditorControl.showOperatingPointVoltages" ) .Scope( AS_GLOBAL ) diff --git a/eeschema/tools/ee_actions.h b/eeschema/tools/ee_actions.h index 813970f50a..1827271917 100644 --- a/eeschema/tools/ee_actions.h +++ b/eeschema/tools/ee_actions.h @@ -239,6 +239,7 @@ public: static TOOL_ACTION toggleERCWarnings; static TOOL_ACTION toggleERCErrors; static TOOL_ACTION toggleERCExclusions; + static TOOL_ACTION markSimExclusions; static TOOL_ACTION toggleOPVoltages; static TOOL_ACTION toggleOPCurrents; static TOOL_ACTION toggleSyncedPinsMode; diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 7a2f01fe14..01666cd931 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -1014,6 +1014,17 @@ int SCH_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent ) { int flags = 0; + auto invalidateTextVars = + [&flags]( EDA_TEXT* text ) + { + if( text->HasTextVars() ) + { + text->ClearRenderCache(); + text->ClearBoundingBoxCache(); + flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; + } + }; + // Netclass coloured items // if( dynamic_cast( aItem ) ) @@ -1028,31 +1039,19 @@ int SCH_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent ) if( SCH_ITEM* item = dynamic_cast( aItem ) ) { item->RunOnChildren( - [&flags]( SCH_ITEM* aChild ) + [&invalidateTextVars]( SCH_ITEM* aChild ) { - EDA_TEXT* text = dynamic_cast( aChild ); - - if( text && text->HasTextVars() ) - { - text->ClearRenderCache(); - text->ClearBoundingBoxCache(); - flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; - } + if( EDA_TEXT* text = dynamic_cast( aChild ) ) + invalidateTextVars( text ); } ); - EDA_TEXT* text = dynamic_cast( aItem ); - - if( text && text->HasTextVars() ) - { - text->ClearRenderCache(); - text->ClearBoundingBoxCache(); - flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; - } - if( flags & KIGFX::GEOMETRY ) m_frame->GetScreen()->Update( item, false ); // Refresh RTree } + if( EDA_TEXT* text = dynamic_cast( aItem ) ) + invalidateTextVars( text ); + return flags; } ); } @@ -2473,7 +2472,52 @@ int SCH_EDITOR_CONTROL::ToggleERCExclusions( const TOOL_EVENT& aEvent ) EESCHEMA_SETTINGS* cfg = m_frame->eeconfig(); cfg->m_Appearance.show_erc_exclusions = !cfg->m_Appearance.show_erc_exclusions; - getView()->SetLayerVisible( LAYER_ERC_EXCLUSION, cfg->m_Appearance.show_erc_exclusions ); + m_frame->GetCanvas()->Refresh(); + + return 0; +} + + +int SCH_EDITOR_CONTROL::MarkSimExclusions( const TOOL_EVENT& aEvent ) +{ + EESCHEMA_SETTINGS* cfg = m_frame->eeconfig(); + cfg->m_Appearance.mark_sim_exclusions = !cfg->m_Appearance.mark_sim_exclusions; + + m_frame->GetCanvas()->GetView()->UpdateAllItemsConditionally( + [&]( KIGFX::VIEW_ITEM* aItem ) -> int + { + int flags = 0; + + auto invalidateTextVars = + [&flags]( EDA_TEXT* text ) + { + if( text->HasTextVars() ) + { + text->ClearRenderCache(); + text->ClearBoundingBoxCache(); + flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; + } + }; + + if( SCH_ITEM* item = dynamic_cast( aItem ) ) + { + item->RunOnChildren( + [&invalidateTextVars]( SCH_ITEM* aChild ) + { + if( EDA_TEXT* text = dynamic_cast( aChild ) ) + invalidateTextVars( text ); + } ); + + if( item->GetExcludedFromSim() ) + flags |= KIGFX::GEOMETRY | KIGFX::REPAINT; + } + + if( EDA_TEXT* text = dynamic_cast( aItem ) ) + invalidateTextVars( text ); + + return flags; + } ); + m_frame->GetCanvas()->Refresh(); return 0; @@ -2741,6 +2785,7 @@ void SCH_EDITOR_CONTROL::setTransitions() Go( &SCH_EDITOR_CONTROL::ToggleERCWarnings, EE_ACTIONS::toggleERCWarnings.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ToggleERCErrors, EE_ACTIONS::toggleERCErrors.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ToggleERCExclusions, EE_ACTIONS::toggleERCExclusions.MakeEvent() ); + Go( &SCH_EDITOR_CONTROL::MarkSimExclusions, EE_ACTIONS::markSimExclusions.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ToggleOPVoltages, EE_ACTIONS::toggleOPVoltages.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ToggleOPCurrents, EE_ACTIONS::toggleOPCurrents.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ChangeLineMode, EE_ACTIONS::lineModeFree.MakeEvent() ); diff --git a/eeschema/tools/sch_editor_control.h b/eeschema/tools/sch_editor_control.h index 41190a8bf4..16916ec3a4 100644 --- a/eeschema/tools/sch_editor_control.h +++ b/eeschema/tools/sch_editor_control.h @@ -136,6 +136,7 @@ public: int ToggleERCWarnings( const TOOL_EVENT& aEvent ); int ToggleERCErrors( const TOOL_EVENT& aEvent ); int ToggleERCExclusions( const TOOL_EVENT& aEvent ); + int MarkSimExclusions( const TOOL_EVENT& aEvent ); int ToggleOPVoltages( const TOOL_EVENT& aEvent ); int ToggleOPCurrents( const TOOL_EVENT& aEvent ); int ChangeLineMode( const TOOL_EVENT& aEvent ); diff --git a/include/layer_ids.h b/include/layer_ids.h index 9f80f2e19a..c54ede2987 100644 --- a/include/layer_ids.h +++ b/include/layer_ids.h @@ -383,6 +383,7 @@ enum SCH_LAYER_ID: int LAYER_ERC_WARN, LAYER_ERC_ERR, LAYER_ERC_EXCLUSION, + LAYER_EXCLUDED_FROM_SIM, LAYER_DEVICE_BACKGROUND, LAYER_SHEET_BACKGROUND, LAYER_SCHEMATIC_GRID,