Fix wxWidgets alert on integer overflow.

This commit is contained in:
Jeff Young 2020-06-13 22:42:35 +01:00
parent 998fe12a5a
commit e16426987a
1 changed files with 4 additions and 4 deletions

View File

@ -570,8 +570,8 @@ void SCH_EDIT_FRAME::DrawCurrentSheetToClipboard()
int maxdim = std::max( dcsize.x, dcsize.y );
// the max size in pixels of the bitmap used to byuild the sheet copy
const int maxbitmapsize = 3000;
// the max size in pixels of the bitmap used to build the sheet copy
const int maxbitmapsize = 5600;
while( int( maxdim * scale ) > maxbitmapsize )
{
@ -592,12 +592,12 @@ void SCH_EDIT_FRAME::DrawCurrentSheetToClipboard()
wxMemoryDC dc;
wxBitmap image( dcsize );
dc.SelectObject( image );
dc.Clear();
GRResetPenAndBrush( &dc );
GRForceBlackPen( false );
dc.SetUserScale( scale, scale );
dc.Clear();
GetRenderSettings()->SetPrintDC( &dc );
PrintPage( GetRenderSettings() );