all: add display distance to local coordinates in status bar
This commit is contained in:
parent
72e9106481
commit
389656e58c
|
@ -127,7 +127,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* father, int idtype, const wxString& ti
|
||||||
// system font specific sizing in the future.
|
// system font specific sizing in the future.
|
||||||
#define ZOOM_DISPLAY_SIZE 60
|
#define ZOOM_DISPLAY_SIZE 60
|
||||||
#define COORD_DISPLAY_SIZE 165
|
#define COORD_DISPLAY_SIZE 165
|
||||||
#define DELTA_DISPLAY_SIZE 190
|
#define DELTA_DISPLAY_SIZE 245
|
||||||
#define UNITS_DISPLAY_SIZE 65
|
#define UNITS_DISPLAY_SIZE 65
|
||||||
#define FUNCTION_DISPLAY_SIZE 110
|
#define FUNCTION_DISPLAY_SIZE 110
|
||||||
static const int dims[6] = { -1, ZOOM_DISPLAY_SIZE,
|
static const int dims[6] = { -1, ZOOM_DISPLAY_SIZE,
|
||||||
|
@ -777,12 +777,12 @@ void EDA_DRAW_FRAME::UpdateStatusBar()
|
||||||
if( m_internalUnits == EESCHEMA_INTERNAL_UNIT )
|
if( m_internalUnits == EESCHEMA_INTERNAL_UNIT )
|
||||||
{
|
{
|
||||||
absformatter = wxT( "X %.3f Y %.3f" );
|
absformatter = wxT( "X %.3f Y %.3f" );
|
||||||
locformatter = wxT( "dx %.3f dy %.3f" );
|
locformatter = wxT( "dx %.3f dy %.3f d %.3f" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
absformatter = wxT( "X %.4f Y %.4f" );
|
absformatter = wxT( "X %.4f Y %.4f" );
|
||||||
locformatter = wxT( "dx %.4f dy %.4f" );
|
locformatter = wxT( "dx %.4f dy %.4f d %.4f" );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -790,18 +790,18 @@ void EDA_DRAW_FRAME::UpdateStatusBar()
|
||||||
if( m_internalUnits == EESCHEMA_INTERNAL_UNIT )
|
if( m_internalUnits == EESCHEMA_INTERNAL_UNIT )
|
||||||
{
|
{
|
||||||
absformatter = wxT( "X %.2f Y %.2f" );
|
absformatter = wxT( "X %.2f Y %.2f" );
|
||||||
locformatter = wxT( "dx %.2f dy %.2f" );
|
locformatter = wxT( "dx %.2f dy %.2f d %.2f" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
absformatter = wxT( "X %.3f Y %.3f" );
|
absformatter = wxT( "X %.3f Y %.3f" );
|
||||||
locformatter = wxT( "dx %.3f dy %.3f" );
|
locformatter = wxT( "dx %.3f dy %.3f d %.3f" );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UNSCALED_UNITS:
|
case UNSCALED_UNITS:
|
||||||
absformatter = wxT( "X %f Y %f" );
|
absformatter = wxT( "X %f Y %f" );
|
||||||
locformatter = wxT( "dx %f dy %f" );
|
locformatter = wxT( "dx %f dy %f d %f" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -821,7 +821,7 @@ void EDA_DRAW_FRAME::UpdateStatusBar()
|
||||||
}
|
}
|
||||||
|
|
||||||
// We already decided the formatter above
|
// We already decided the formatter above
|
||||||
Line.Printf( locformatter, dXpos, dYpos );
|
Line.Printf( locformatter, dXpos, dYpos, sqrt( dXpos * dXpos + dYpos * dYpos ) );
|
||||||
SetStatusText( Line, 3 );
|
SetStatusText( Line, 3 );
|
||||||
|
|
||||||
// refresh units display
|
// refresh units display
|
||||||
|
|
Loading…
Reference in New Issue