Use embedded wxMax function to obtain largest of two values when calculating bitmap dimension.

This commit is contained in:
Artur Wieczorek
2015-05-25 22:45:40 +02:00
parent 2e5df8746a
commit 41201d661e

View File

@@ -4656,9 +4656,8 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
if ( !m_doubleBuffer )
{
// Create double buffer bitmap to draw on, if none
int w = (width>250)?width:250;
int h = height + dblh;
h = (h>400)?h:400;
int w = wxMax(width, 250);
int h = wxMax(height + dblh, 400);
m_doubleBuffer = new wxBitmap( w, h );
}
else