Fix wxWidgets alert on integer overflow.
This commit is contained in:
parent
998fe12a5a
commit
e16426987a
|
@ -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() );
|
||||
|
|
Loading…
Reference in New Issue