SYMBOL_EDIT_FRAME: fix a better initial zoom when no symbol loaded

This commit is contained in:
jean-pierre charras 2022-08-08 10:55:53 +02:00
parent 3958591333
commit 842c8df4c3
1 changed files with 6 additions and 2 deletions

View File

@ -1232,8 +1232,12 @@ const BOX2I SYMBOL_EDIT_FRAME::GetDocumentExtents( bool aIncludeAllVisible ) con
{
if( !m_symbol )
{
return BOX2I( VECTOR2I( Mils2iu( -100 ), Mils2iu( -100 ) ),
VECTOR2I( Mils2iu( 200 ), Mils2iu( 200 ) ) );
// Gives a reasonable drawing area size
int width = Millimeter2iu( 50 );
int height = Millimeter2iu( 30 );
return BOX2I( VECTOR2I( -width/2, -height/2 ),
VECTOR2I( width, height ) );
}
else
{