Schematic editor: fix not working tool to show/hide invisible pins.

Fixes #4222
https://gitlab.com/kicad/code/kicad/issues/4222
This commit is contained in:
jean-pierre charras 2020-04-18 09:57:04 +02:00
parent 8f0449cbab
commit 98b9c80eb4
4 changed files with 14 additions and 2 deletions

View File

@ -93,7 +93,7 @@ class NETLIST_OBJECT
{
public:
NETLIST_ITEM m_Type; /* Type of item (see NETLIST_ITEM_T enum) */
EDA_ITEM* m_Comp; /* Pointer to the library item that
EDA_ITEM* m_Comp; /* Pointer to the item that
* created this net object (the parent)
*/
SCH_ITEM* m_Link; /* For SCH_SHEET_PIN:

View File

@ -1668,7 +1668,7 @@ void SCH_COMPONENT::GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems,
// There is an associated PIN_LABEL.
item = new NETLIST_OBJECT();
item->m_SheetPathInclude = *aSheetPath;
item->m_Comp = m_pins[ m_pinMap.at( pin ) ].get();;
item->m_Comp = m_pins[ m_pinMap.at( pin ) ].get();
item->m_SheetPath = *aSheetPath;
item->m_Type = NETLIST_ITEM::PINLABEL;
item->m_Label = pin->GetName();

View File

@ -1189,3 +1189,10 @@ bool SCH_EDIT_FRAME::IsContentModified()
return sheetList.IsModified();
}
bool SCH_EDIT_FRAME::GetShowAllPins() const
{
EESCHEMA_SETTINGS* cfg = eeconfig();
return cfg->m_Appearance.show_hidden_pins;
}

View File

@ -183,6 +183,11 @@ public:
void OnCloseWindow( wxCloseEvent& Event );
/**
* Allow edit frame to show/hide hidden pins.
*/
bool GetShowAllPins() const override;
const wxString& GetNetListFormatName() const { return m_netListFormat; }
void SetNetListFormatName( const wxString& aFormat ) { m_netListFormat = aFormat; }