Use embedded wxMax function to obtain largest of two values when calculating bitmap dimension.
This commit is contained in:
@@ -4656,9 +4656,8 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
|
|||||||
if ( !m_doubleBuffer )
|
if ( !m_doubleBuffer )
|
||||||
{
|
{
|
||||||
// Create double buffer bitmap to draw on, if none
|
// Create double buffer bitmap to draw on, if none
|
||||||
int w = (width>250)?width:250;
|
int w = wxMax(width, 250);
|
||||||
int h = height + dblh;
|
int h = wxMax(height + dblh, 400);
|
||||||
h = (h>400)?h:400;
|
|
||||||
m_doubleBuffer = new wxBitmap( w, h );
|
m_doubleBuffer = new wxBitmap( w, h );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user