Expose Show Hidden Fields to GUI.
Fixes https://gitlab.com/kicad/code/kicad/issues/2010
This commit is contained in:
parent
d7d1cb6f78
commit
42cd604c3c
|
@ -52,6 +52,7 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow()
|
|||
EESCHEMA_SETTINGS* cfg = m_frame->eeconfig();
|
||||
|
||||
m_checkShowHiddenPins->SetValue( cfg->m_Appearance.show_hidden_pins );
|
||||
m_checkShowHiddenFields->SetValue( cfg->m_Appearance.show_hidden_fields );
|
||||
m_checkPageLimits->SetValue( cfg->m_Appearance.show_page_limits );
|
||||
|
||||
m_checkSelTextBox->SetValue( cfg->m_Selection.text_as_box );
|
||||
|
@ -70,6 +71,7 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow()
|
|||
EESCHEMA_SETTINGS* cfg = m_frame->eeconfig();
|
||||
|
||||
cfg->m_Appearance.show_hidden_pins = m_checkShowHiddenPins->GetValue();
|
||||
cfg->m_Appearance.show_hidden_fields = m_checkShowHiddenFields->GetValue();
|
||||
cfg->m_Appearance.show_page_limits = m_checkPageLimits->GetValue();
|
||||
|
||||
cfg->m_Selection.text_as_box = m_checkSelTextBox->GetValue();
|
||||
|
@ -79,6 +81,7 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow()
|
|||
|
||||
// Update canvas
|
||||
m_frame->GetRenderSettings()->m_ShowHiddenPins = m_checkShowHiddenPins->GetValue();
|
||||
m_frame->GetRenderSettings()->m_ShowHiddenText = m_checkShowHiddenFields->GetValue();
|
||||
m_frame->GetRenderSettings()->SetShowPageLimits( cfg->m_Appearance.show_page_limits );
|
||||
m_frame->GetCanvas()->GetView()->MarkDirty();
|
||||
m_frame->GetCanvas()->GetView()->UpdateAllItems( KIGFX::REPAINT );
|
||||
|
|
|
@ -28,6 +28,9 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( wxWind
|
|||
m_checkShowHiddenPins = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("S&how hidden pins"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer1->Add( m_checkShowHiddenPins, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkShowHiddenFields = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Show hidden fields"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer1->Add( m_checkShowHiddenFields, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_checkPageLimits = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Show page limi&ts"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkPageLimits->SetValue(true);
|
||||
sbSizer1->Add( m_checkPageLimits, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
|
|
@ -150,6 +150,70 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</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 hidden fields</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_checkShowHiddenFields</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="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
|
|
|
@ -34,6 +34,7 @@ class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE : public wxPanel
|
|||
protected:
|
||||
wxBoxSizer* m_galOptionsSizer;
|
||||
wxCheckBox* m_checkShowHiddenPins;
|
||||
wxCheckBox* m_checkShowHiddenFields;
|
||||
wxCheckBox* m_checkPageLimits;
|
||||
wxCheckBox* m_checkSelTextBox;
|
||||
wxCheckBox* m_checkSelDrawChildItems;
|
||||
|
|
|
@ -394,6 +394,7 @@ void SCH_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
|||
GetRenderSettings()->m_ShowPinsElectricalType = false;
|
||||
GetRenderSettings()->m_ShowHiddenText = false;
|
||||
GetRenderSettings()->m_ShowHiddenPins = eeconfig()->m_Appearance.show_hidden_pins;
|
||||
GetRenderSettings()->m_ShowHiddenText = eeconfig()->m_Appearance.show_hidden_fields;
|
||||
GetRenderSettings()->SetShowPageLimits( eeconfig()->m_Appearance.show_page_limits );
|
||||
GetRenderSettings()->m_ShowUmbilicals = true;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,9 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() : APP_SETTINGS_BASE( "eeschema", eeschema
|
|||
m_params.emplace_back( new PARAM<bool>( "appearance.show_hidden_pins",
|
||||
&m_Appearance.show_hidden_pins, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "appearance.show_hidden_fields",
|
||||
&m_Appearance.show_hidden_fields, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "appearance.show_illegal_symbol_lib_dialog",
|
||||
&m_Appearance.show_illegal_symbol_lib_dialog, true ) );
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ public:
|
|||
bool navigator_stays_open;
|
||||
bool print_sheet_reference;
|
||||
bool show_hidden_pins;
|
||||
bool show_hidden_fields;
|
||||
bool show_illegal_symbol_lib_dialog;
|
||||
bool show_page_limits;
|
||||
bool show_sheet_filename_case_sensitivity_dialog;
|
||||
|
|
|
@ -598,6 +598,11 @@ TOOL_ACTION EE_ACTIONS::toggleHiddenPins( "eeschema.EditorControl.showHiddenPins
|
|||
_( "Show Hidden Pins" ), "",
|
||||
hidden_pin_xpm );
|
||||
|
||||
TOOL_ACTION EE_ACTIONS::toggleHiddenFields( "eeschema.EditorControl.showHiddenFields",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Show Hidden Fields" ), "",
|
||||
nullptr );
|
||||
|
||||
TOOL_ACTION EE_ACTIONS::toggleForceHV( "eeschema.EditorControl.forceHVLines",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Force H/V Wires and Buses" ), "",
|
||||
|
|
|
@ -181,6 +181,7 @@ public:
|
|||
static TOOL_ACTION cleanupSheetPins;
|
||||
static TOOL_ACTION editTextAndGraphics;
|
||||
static TOOL_ACTION toggleHiddenPins;
|
||||
static TOOL_ACTION toggleHiddenFields;
|
||||
static TOOL_ACTION toggleSyncedPinsMode;
|
||||
static TOOL_ACTION restartMove;
|
||||
static TOOL_ACTION explicitCrossProbe;
|
||||
|
|
|
@ -1462,6 +1462,21 @@ int SCH_EDITOR_CONTROL::ToggleHiddenPins( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
|
||||
int SCH_EDITOR_CONTROL::ToggleHiddenFields( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
EESCHEMA_SETTINGS* cfg = m_frame->eeconfig();
|
||||
cfg->m_Appearance.show_hidden_fields = !cfg->m_Appearance.show_hidden_fields;
|
||||
|
||||
KIGFX::SCH_PAINTER* painter = static_cast<KIGFX::SCH_PAINTER*>( getView()->GetPainter() );
|
||||
painter->GetSettings()->m_ShowHiddenText = cfg->m_Appearance.show_hidden_fields;
|
||||
|
||||
getView()->UpdateAllItems( KIGFX::REPAINT );
|
||||
m_frame->GetCanvas()->Refresh();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int SCH_EDITOR_CONTROL::ToggleForceHV( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
m_frame->eeconfig()->m_Drawing.hv_lines_only = !m_frame->eeconfig()->m_Drawing.hv_lines_only;
|
||||
|
@ -1535,5 +1550,6 @@ void SCH_EDITOR_CONTROL::setTransitions()
|
|||
Go( &SCH_EDITOR_CONTROL::NavigateHierarchy, EE_ACTIONS::navigateHierarchy.MakeEvent() );
|
||||
|
||||
Go( &SCH_EDITOR_CONTROL::ToggleHiddenPins, EE_ACTIONS::toggleHiddenPins.MakeEvent() );
|
||||
Go( &SCH_EDITOR_CONTROL::ToggleHiddenFields, EE_ACTIONS::toggleHiddenFields.MakeEvent() );
|
||||
Go( &SCH_EDITOR_CONTROL::ToggleForceHV, EE_ACTIONS::toggleForceHV.MakeEvent() );
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ public:
|
|||
int NavigateHierarchy( const TOOL_EVENT& aEvent );
|
||||
|
||||
int ToggleHiddenPins( const TOOL_EVENT& aEvent );
|
||||
int ToggleHiddenFields( const TOOL_EVENT& aEvent );
|
||||
int ToggleForceHV( const TOOL_EVENT& aEvent );
|
||||
|
||||
void BackAnnotateFootprints( const std::string& aChangedSetOfReferences );
|
||||
|
|
Loading…
Reference in New Issue