Move ZoomFitScreen from GetBoundingBox to GetDocumentExtents.

This commit is contained in:
Jeff Young 2019-04-14 00:53:33 +01:00
parent 078fdb9077
commit 91bf08df1a
2 changed files with 7 additions and 3 deletions

View File

@ -235,10 +235,9 @@ int COMMON_TOOLS::ZoomFitScreen( const TOOL_EVENT& aEvent )
{
KIGFX::VIEW* view = getView();
EDA_DRAW_PANEL_GAL* galCanvas = m_frame->GetGalCanvas();
EDA_ITEM* model = getModel<EDA_ITEM>();
EDA_BASE_FRAME* frame = getEditFrame<EDA_BASE_FRAME>();
EDA_DRAW_FRAME* frame = getEditFrame<EDA_DRAW_FRAME>();
BOX2I bBox = model->ViewBBox();
BOX2I bBox = frame->GetDocumentExtents();
VECTOR2D scrollbarSize = VECTOR2D( galCanvas->GetSize() - galCanvas->GetClientSize() );
VECTOR2D screenSize = view->ToWorld( galCanvas->GetClientSize(), false );

View File

@ -133,6 +133,11 @@ public:
*/
EDA_RECT GetBoardBoundingBox( bool aBoardEdgesOnly = false ) const;
const BOX2I GetDocumentExtents() const override
{
return GetBoardBoundingBox( false );
}
virtual void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
const PAGE_INFO& GetPageSettings() const override;
const wxSize GetPageSizeIU() const override;