diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index f317335ed9..b65e7b1c2a 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -749,8 +749,6 @@ void PL_EDITOR_FRAME::UpdateStatusBar() line.Printf( _("coord origin: %s"), m_originSelectBox->GetString( m_originSelectChoice ).GetData() ); SetStatusText( line, 5 ); - - // Display units } @@ -801,6 +799,7 @@ void PL_EDITOR_FRAME::HardRedraw() m_propertiesPagelayout->CopyPrmsFromItemToPanel( item ); m_propertiesPagelayout->CopyPrmsFromGeneralToPanel(); + UpdateMsgPanelInfo(); GetCanvas()->Refresh(); } @@ -925,3 +924,18 @@ bool PL_EDITOR_FRAME::GetPageNumberOption() const { return m_pageSelectBox->GetSelection() == 0; } + +#if 1 +void PL_EDITOR_FRAME::UpdateMsgPanelInfo() +{ + VECTOR2D size = GetPageSettings().GetSizeIU(); + + std::vector msgItems; + msgItems.emplace_back( _( "Page Width" ), MessageTextFromValue( GetUserUnits(), size.x ) ); + + msgItems.emplace_back( + _( "Page Height" ), MessageTextFromValue( GetUserUnits(), size.y ) ); + + SetMsgPanel( msgItems ); +} +#endif \ No newline at end of file diff --git a/pagelayout_editor/pl_editor_frame.h b/pagelayout_editor/pl_editor_frame.h index 3c7a059756..70cb6e7b53 100644 --- a/pagelayout_editor/pl_editor_frame.h +++ b/pagelayout_editor/pl_editor_frame.h @@ -164,6 +164,11 @@ public: */ void UpdateTitleAndInfo(); + /** + * Display the size of the sheet to the message panel. + */ + void UpdateMsgPanelInfo(); + void LoadSettings( APP_SETTINGS_BASE* aCfg ) override; void SaveSettings( APP_SETTINGS_BASE* aCfg ) override; diff --git a/pagelayout_editor/pl_editor_layout.cpp b/pagelayout_editor/pl_editor_layout.cpp index 8e1e87f1bd..7ccd9d14cf 100644 --- a/pagelayout_editor/pl_editor_layout.cpp +++ b/pagelayout_editor/pl_editor_layout.cpp @@ -53,14 +53,3 @@ EDA_RECT PL_EDITOR_LAYOUT::ComputeBoundingBox() SetBoundingBox( bbox ); return bbox; } - - -void PL_EDITOR_LAYOUT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) -{ - VECTOR2D 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 f7dee6894d..a2500b6072 100644 --- a/pagelayout_editor/pl_editor_layout.h +++ b/pagelayout_editor/pl_editor_layout.h @@ -74,8 +74,6 @@ public: void SetBoundingBox( const EDA_RECT& aBox ) { m_boundingBox = aBox; } - 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 c1c5c86ac7..414693addd 100644 --- a/pagelayout_editor/tools/pl_editor_control.cpp +++ b/pagelayout_editor/tools/pl_editor_control.cpp @@ -161,10 +161,7 @@ int PL_EDITOR_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent ) } else { - std::vector msgItems; - m_frame->GetPageLayout().GetMsgPanelInfo( m_frame, msgItems ); - m_frame->SetMsgPanel( msgItems ); - + m_frame->UpdateMsgPanelInfo(); m_frame->GetPropertiesFrame()->CopyPrmsFromItemToPanel( nullptr ); }