avoiding a -1,-1 being set as icon size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -61,8 +61,11 @@ wxIcon::wxIcon(WXHICON icon, const wxSize& size)
|
|||||||
AcquireIconRef( (IconRef) icon ) ;
|
AcquireIconRef( (IconRef) icon ) ;
|
||||||
|
|
||||||
m_refData = new wxIconRefData( icon ) ;
|
m_refData = new wxIconRefData( icon ) ;
|
||||||
M_ICONDATA->SetWidth( size.x ) ;
|
if ( (size.x != -1) && (size.y != -1) )
|
||||||
M_ICONDATA->SetHeight( size.y ) ;
|
{
|
||||||
|
M_ICONDATA->SetWidth( size.x ) ;
|
||||||
|
M_ICONDATA->SetHeight( size.y ) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxIcon::~wxIcon()
|
wxIcon::~wxIcon()
|
||||||
|
Reference in New Issue
Block a user