Eeschema: minor enhancement: add SCH_JUNCTION::GetMsgPanelInfo() and show info.
This commit is contained in:
parent
d180ce7865
commit
afc6b325b2
|
@ -31,10 +31,12 @@
|
||||||
#include <geometry/shape_rect.h>
|
#include <geometry/shape_rect.h>
|
||||||
#include <sch_painter.h>
|
#include <sch_painter.h>
|
||||||
#include <sch_junction.h>
|
#include <sch_junction.h>
|
||||||
|
#include <sch_edit_frame.h>
|
||||||
#include <sch_connection.h>
|
#include <sch_connection.h>
|
||||||
#include <schematic.h>
|
#include <schematic.h>
|
||||||
#include <settings/color_settings.h>
|
#include <settings/color_settings.h>
|
||||||
#include <connection_graph.h>
|
#include <connection_graph.h>
|
||||||
|
#include <string_utils.h>
|
||||||
|
|
||||||
|
|
||||||
SCH_JUNCTION::SCH_JUNCTION( const VECTOR2I& aPosition, int aDiameter, SCH_LAYER_ID aLayer ) :
|
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();
|
return GetColor() < junction->GetColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SCH_JUNCTION::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||||
|
{
|
||||||
|
aList.emplace_back( _( "Junction" ), wxEmptyString );
|
||||||
|
|
||||||
|
aList.emplace_back( _( "Size" ), aFrame->MessageTextFromValue( GetEffectiveDiameter() ) );
|
||||||
|
|
||||||
|
SCH_CONNECTION* conn = nullptr;
|
||||||
|
|
||||||
|
if( !IsConnectivityDirty() && dynamic_cast<SCH_EDIT_FRAME*>( aFrame ) )
|
||||||
|
conn = Connection();
|
||||||
|
|
||||||
|
if( conn )
|
||||||
|
{
|
||||||
|
conn->AppendInfoToMsgPanel( aList );
|
||||||
|
|
||||||
|
if( !conn->IsBus() )
|
||||||
|
{
|
||||||
|
aList.emplace_back( _( "Resolved Netclass" ),
|
||||||
|
UnescapeString( GetEffectiveNetClass()->GetName() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,8 @@ public:
|
||||||
|
|
||||||
virtual bool operator <( const SCH_ITEM& aItem ) const override;
|
virtual bool operator <( const SCH_ITEM& aItem ) const override;
|
||||||
|
|
||||||
|
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
|
||||||
|
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
void Show( int nestLevel, std::ostream& os ) const override;
|
void Show( int nestLevel, std::ostream& os ) const override;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue