diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 74ad2f5c17..c2e9cf7a5b 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -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 ); diff --git a/pagelayout_editor/pl_editor_layout.cpp b/pagelayout_editor/pl_editor_layout.cpp index 3ec62e6ed4..3ee95b12c6 100644 --- a/pagelayout_editor/pl_editor_layout.cpp +++ b/pagelayout_editor/pl_editor_layout.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include #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& 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 ) ); +} diff --git a/pagelayout_editor/pl_editor_layout.h b/pagelayout_editor/pl_editor_layout.h index 2213d07d1b..a9ec3d0f91 100644 --- a/pagelayout_editor/pl_editor_layout.h +++ b/pagelayout_editor/pl_editor_layout.h @@ -84,6 +84,8 @@ public: void SetBoundingBox( const EDA_RECT& aBox ) { m_boundingBox = aBox; } + virtual void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ); + #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const; #endif diff --git a/pagelayout_editor/tools/pl_editor_control.cpp b/pagelayout_editor/tools/pl_editor_control.cpp index 8f1a1b454e..6a923af1db 100644 --- a/pagelayout_editor/tools/pl_editor_control.cpp +++ b/pagelayout_editor/tools/pl_editor_control.cpp @@ -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 ); }