Fix the pleditor status bar text
This commit is contained in:
parent
4e9b9ee9cd
commit
5a2ef73d66
|
@ -667,7 +667,7 @@ void PL_EDITOR_FRAME::DisplayGridMsg()
|
|||
void PL_EDITOR_FRAME::UpdateStatusBar()
|
||||
{
|
||||
// Display Zoom level:
|
||||
EDA_DRAW_FRAME::UpdateStatusBar();
|
||||
SetStatusText( GetZoomLevelIndicator(), 1 );
|
||||
|
||||
// coordinate origin can be the paper Top Left corner, or each of 4 page corners
|
||||
wxPoint originCoord = ReturnCoordOriginCorner();
|
||||
|
@ -706,7 +706,6 @@ void PL_EDITOR_FRAME::UpdateStatusBar()
|
|||
double dXpos = To_User_Unit( GetUserUnits(), coord.x * Xsign );
|
||||
double dYpos = To_User_Unit( GetUserUnits(), coord.y * Ysign );
|
||||
|
||||
wxString pagesizeformatter = _( "Page size: width %.4g height %.4g" );
|
||||
wxString absformatter = wxT( "X %.4g Y %.4g" );
|
||||
wxString locformatter = wxT( "dx %.4g dy %.4g" );
|
||||
|
||||
|
@ -721,13 +720,6 @@ void PL_EDITOR_FRAME::UpdateStatusBar()
|
|||
|
||||
wxString line;
|
||||
|
||||
// Display page size
|
||||
#define MILS_TO_MM (25.4/1000)
|
||||
DSIZE size = GetPageSettings().GetSizeMils();
|
||||
size = size * MILS_TO_MM;
|
||||
line.Printf( pagesizeformatter, size.x, size.y );
|
||||
SetStatusText( line, 0 );
|
||||
|
||||
// Display abs coordinates
|
||||
line.Printf( absformatter, dXpos, dYpos );
|
||||
SetStatusText( line, 2 );
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <algorithm>
|
||||
#include <climits>
|
||||
|
||||
#include <eda_draw_frame.h>
|
||||
#include <eda_item.h>
|
||||
#include <eda_rect.h>
|
||||
#include "pl_editor_layout.h"
|
||||
|
@ -44,6 +45,7 @@ PL_EDITOR_LAYOUT::~PL_EDITOR_LAYOUT()
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT PL_EDITOR_LAYOUT::ComputeBoundingBox()
|
||||
{
|
||||
EDA_RECT bbox;
|
||||
|
@ -51,3 +53,14 @@ EDA_RECT PL_EDITOR_LAYOUT::ComputeBoundingBox()
|
|||
SetBoundingBox( bbox );
|
||||
return bbox;
|
||||
}
|
||||
|
||||
|
||||
void PL_EDITOR_LAYOUT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||
{
|
||||
DSIZE size = GetPageSettings().GetSizeIU();
|
||||
|
||||
aList.emplace_back( _( "Page Width" ), MessageTextFromValue( aFrame->GetUserUnits(), size.x ) );
|
||||
|
||||
aList.emplace_back(
|
||||
_( "Page Height" ), MessageTextFromValue( aFrame->GetUserUnits(), size.y ) );
|
||||
}
|
||||
|
|
|
@ -84,6 +84,8 @@ public:
|
|||
|
||||
void SetBoundingBox( const EDA_RECT& aBox ) { m_boundingBox = aBox; }
|
||||
|
||||
virtual void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList );
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const;
|
||||
#endif
|
||||
|
|
|
@ -159,7 +159,10 @@ int PL_EDITOR_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
else
|
||||
{
|
||||
m_frame->ClearMsgPanel();
|
||||
MSG_PANEL_ITEMS msgItems;
|
||||
m_frame->GetPageLayout().GetMsgPanelInfo( m_frame, msgItems );
|
||||
m_frame->SetMsgPanel( msgItems );
|
||||
|
||||
m_frame->GetPropertiesFrame()->CopyPrmsFromItemToPanel( nullptr );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue