Commit 71e5fb13 authored by John Beard's avatar John Beard Committed by Wayne Stambaugh

Segment message panel infromation improvements.

* Make "Drawing" string translatable.
* Add segment length to message panel.
* Add segment angle to message panel.
parent 9245b903
...@@ -317,7 +317,7 @@ void DRAWSEGMENT::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) ...@@ -317,7 +317,7 @@ void DRAWSEGMENT::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
wxASSERT( m_Parent ); wxASSERT( m_Parent );
msg = wxT( "DRAWING" ); msg = _( "Drawing" );
aList.push_back( MSG_PANEL_ITEM( _( "Type" ), msg, DARKCYAN ) ); aList.push_back( MSG_PANEL_ITEM( _( "Type" ), msg, DARKCYAN ) );
...@@ -340,7 +340,18 @@ void DRAWSEGMENT::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) ...@@ -340,7 +340,18 @@ void DRAWSEGMENT::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
break; break;
default: default:
{
aList.push_back( MSG_PANEL_ITEM( shape, _( "Segment" ), RED ) ); 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; wxString start;
......
...@@ -280,17 +280,15 @@ void EDGE_MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) ...@@ -280,17 +280,15 @@ void EDGE_MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
if( !board ) if( !board )
return; 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( _( "Module" ), module->GetReference(), DARKCYAN ) );
aList.push_back( MSG_PANEL_ITEM( _( "Value" ), module->GetValue(), BLUE ) ); aList.push_back( MSG_PANEL_ITEM( _( "Value" ), module->GetValue(), BLUE ) );
msg.Printf( wxT( "%8.8lX" ), module->GetTimeStamp() ); msg.Printf( wxT( "%8.8lX" ), module->GetTimeStamp() );
aList.push_back( MSG_PANEL_ITEM( _( "TimeStamp" ), msg, BROWN ) ); aList.push_back( MSG_PANEL_ITEM( _( "TimeStamp" ), msg, BROWN ) );
aList.push_back( MSG_PANEL_ITEM( _( "Mod Layer" ), aList.push_back( MSG_PANEL_ITEM( _( "Mod Layer" ),
module->GetLayerName(), RED ) ); module->GetLayerName(), RED ) );
aList.push_back( MSG_PANEL_ITEM( _( "Seg Layer" ),
GetLayerName(), RED ) ); // append the features shared with the base class
msg = ::CoordinateToString( m_Width ); DRAWSEGMENT::GetMsgPanelInfo( aList );
aList.push_back( MSG_PANEL_ITEM( _( "Width" ), msg, BLUE ) );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment