Fix bus unfolding with prefixes

This commit is contained in:
Jon Evans 2020-05-24 19:16:21 -04:00
parent 82a2530863
commit 77a6550ba9
2 changed files with 7 additions and 2 deletions

View File

@ -162,6 +162,11 @@ public:
wxString LocalName() const { return m_local_name; }
wxString FullLocalName() const
{
return m_prefix + m_local_name + m_suffix;
}
void SetName( const wxString& aName )
{
m_name = aName;

View File

@ -152,7 +152,7 @@ private:
for( const auto& member : connection->Members() )
{
int id = ID_POPUP_SCH_UNFOLD_BUS + ( idx++ );
wxString name = SCH_CONNECTION::PrintBusForUI( member->LocalName() );
wxString name = SCH_CONNECTION::PrintBusForUI( member->FullLocalName() );
if( member->Type() == CONNECTION_TYPE::BUS )
{
@ -163,7 +163,7 @@ private:
for( const auto& sub_member : member->Members() )
{
id = ID_POPUP_SCH_UNFOLD_BUS + ( idx++ );
name = SCH_CONNECTION::PrintBusForUI( sub_member->LocalName() );
name = SCH_CONNECTION::PrintBusForUI( sub_member->FullLocalName() );
submenu->Append( id, name, wxEmptyString );
}
}