diff --git a/eeschema/sch_junction.cpp b/eeschema/sch_junction.cpp index 6ac0fe1344..ef2f186177 100644 --- a/eeschema/sch_junction.cpp +++ b/eeschema/sch_junction.cpp @@ -31,10 +31,12 @@ #include #include #include +#include #include #include #include #include +#include SCH_JUNCTION::SCH_JUNCTION( const VECTOR2I& aPosition, int aDiameter, SCH_LAYER_ID aLayer ) : @@ -278,3 +280,27 @@ bool SCH_JUNCTION::operator <( const SCH_ITEM& aItem ) const return GetColor() < junction->GetColor(); } + +void SCH_JUNCTION::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) +{ + aList.emplace_back( _( "Junction" ), wxEmptyString ); + + aList.emplace_back( _( "Size" ), aFrame->MessageTextFromValue( GetEffectiveDiameter() ) ); + + SCH_CONNECTION* conn = nullptr; + + if( !IsConnectivityDirty() && dynamic_cast( aFrame ) ) + conn = Connection(); + + if( conn ) + { + conn->AppendInfoToMsgPanel( aList ); + + if( !conn->IsBus() ) + { + aList.emplace_back( _( "Resolved Netclass" ), + UnescapeString( GetEffectiveNetClass()->GetName() ) ); + } + } +} + diff --git a/eeschema/sch_junction.h b/eeschema/sch_junction.h index 0be491bf71..a953360b09 100644 --- a/eeschema/sch_junction.h +++ b/eeschema/sch_junction.h @@ -123,6 +123,8 @@ public: virtual bool operator <( const SCH_ITEM& aItem ) const override; + void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) override; + #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const override; #endif