diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index b680e9b3d3..9f7e71fc0e 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -317,7 +317,7 @@ void DRAWSEGMENT::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) wxASSERT( m_Parent ); - msg = wxT( "DRAWING" ); + msg = _( "Drawing" ); aList.push_back( MSG_PANEL_ITEM( _( "Type" ), msg, DARKCYAN ) ); @@ -340,7 +340,18 @@ void DRAWSEGMENT::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) break; default: + { aList.push_back( MSG_PANEL_ITEM( shape, _( "Segment" ), RED ) ); + + msg = ::CoordinateToString( GetLineLength( m_Start, m_End ) ); + aList.push_back( MSG_PANEL_ITEM( _( "Length" ), msg, DARKGREEN ) ); + + // angle counter-clockwise from 3'o-clock + const double deg = RAD2DEG( atan2( m_Start.y - m_End.y, + m_End.x - m_Start.x ) ); + msg.Printf( wxT( "%.1f" ), deg ); + aList.push_back( MSG_PANEL_ITEM( _( "Angle" ), msg, DARKGREEN ) ); + } } wxString start; diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index 6ade01c509..f861798893 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -280,17 +280,15 @@ void EDGE_MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) if( !board ) return; - aList.push_back( MSG_PANEL_ITEM( _( "Graphic Item" ), wxEmptyString, DARKCYAN ) ); aList.push_back( MSG_PANEL_ITEM( _( "Module" ), module->GetReference(), DARKCYAN ) ); aList.push_back( MSG_PANEL_ITEM( _( "Value" ), module->GetValue(), BLUE ) ); msg.Printf( wxT( "%8.8lX" ), module->GetTimeStamp() ); aList.push_back( MSG_PANEL_ITEM( _( "TimeStamp" ), msg, BROWN ) ); aList.push_back( MSG_PANEL_ITEM( _( "Mod Layer" ), module->GetLayerName(), RED ) ); - aList.push_back( MSG_PANEL_ITEM( _( "Seg Layer" ), - GetLayerName(), RED ) ); - msg = ::CoordinateToString( m_Width ); - aList.push_back( MSG_PANEL_ITEM( _( "Width" ), msg, BLUE ) ); + + // append the features shared with the base class + DRAWSEGMENT::GetMsgPanelInfo( aList ); }