mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Remove schematic view size limitation
We don't need to worry about scrollbar button sizes anymore, so we don't need to limit the viewport size based on the page Fixes https://gitlab.com/kicad/code/kicad/-/issues/20594 (cherry picked from commit ff6bee400e4e3a554a97722428ce9425ebbe0a93)
This commit is contained in:
parent
069954fa31
commit
6f54b11431
@ -49,13 +49,6 @@ SCH_VIEW::SCH_VIEW( SCH_BASE_FRAME* aFrame ) :
|
||||
VIEW()
|
||||
{
|
||||
m_frame = aFrame;
|
||||
|
||||
// Set m_boundary to define the max working area size. The default value is acceptable for
|
||||
// Pcbnew and Gerbview, but too large for Eeschema due to very different internal units.
|
||||
// A full size = 3 * MAX_PAGE_SIZE_MILS size allows a wide margin around the drawing-sheet.
|
||||
double max_size = schIUScale.MilsToIU( MAX_PAGE_SIZE_EESCHEMA_MILS ) * 3.0;
|
||||
m_boundary.SetOrigin( -max_size/4, -max_size/4 );
|
||||
m_boundary.SetSize( max_size, max_size );
|
||||
}
|
||||
|
||||
|
||||
@ -82,16 +75,6 @@ void SCH_VIEW::SetScale( double aScale, VECTOR2D aAnchor )
|
||||
}
|
||||
|
||||
|
||||
void SCH_VIEW::ResizeSheetWorkingArea( const SCH_SCREEN* aScreen )
|
||||
{
|
||||
const PAGE_INFO& page_info = aScreen->GetPageSettings();
|
||||
double max_size_x = page_info.GetWidthIU( schIUScale.IU_PER_MILS ) * 3.0;
|
||||
double max_size_y = page_info.GetHeightIU( schIUScale.IU_PER_MILS ) * 3.0;
|
||||
m_boundary.SetOrigin( -max_size_x / 4, -max_size_y / 4 );
|
||||
m_boundary.SetSize( max_size_x, max_size_y );
|
||||
}
|
||||
|
||||
|
||||
void SCH_VIEW::DisplaySheet( const SCH_SCREEN *aScreen )
|
||||
{
|
||||
for( SCH_ITEM* item : aScreen->Items() )
|
||||
@ -123,8 +106,6 @@ void SCH_VIEW::DisplaySheet( const SCH_SCREEN *aScreen )
|
||||
m_drawingSheet->SetSheetPath( "" );
|
||||
}
|
||||
|
||||
ResizeSheetWorkingArea( aScreen );
|
||||
|
||||
Add( m_drawingSheet.get() );
|
||||
|
||||
InitPreview();
|
||||
|
@ -105,9 +105,6 @@ public:
|
||||
void DisplaySheet( const SCH_SCREEN* aScreen );
|
||||
void DisplaySymbol( LIB_SYMBOL* aSymbol );
|
||||
|
||||
// Call it to set new draw area limits (max working and draw area size)
|
||||
void ResizeSheetWorkingArea( const SCH_SCREEN *aScreen );
|
||||
|
||||
void SetScale( double aScale, VECTOR2D aAnchor = { 0, 0 } ) override;
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user