m_font may not have been set yet. Default to letting GetTextExtent
call GetFont. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -542,7 +542,7 @@ wxSize wxChoice::DoGetBestSize() const
|
|||||||
size_t count = GetCount();
|
size_t count = GetCount();
|
||||||
for ( size_t n = 0; n < count; n++ )
|
for ( size_t n = 0; n < count; n++ )
|
||||||
{
|
{
|
||||||
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
|
GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
|
||||||
if ( width > ret.x )
|
if ( width > ret.x )
|
||||||
ret.x = width;
|
ret.x = width;
|
||||||
}
|
}
|
||||||
|
@@ -779,7 +779,7 @@ wxSize wxComboBox::DoGetBestSize() const
|
|||||||
size_t count = GetCount();
|
size_t count = GetCount();
|
||||||
for ( size_t n = 0; n < count; n++ )
|
for ( size_t n = 0; n < count; n++ )
|
||||||
{
|
{
|
||||||
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
|
GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
|
||||||
if ( width > ret.x )
|
if ( width > ret.x )
|
||||||
ret.x = width;
|
ret.x = width;
|
||||||
}
|
}
|
||||||
|
@@ -542,7 +542,7 @@ wxSize wxChoice::DoGetBestSize() const
|
|||||||
size_t count = GetCount();
|
size_t count = GetCount();
|
||||||
for ( size_t n = 0; n < count; n++ )
|
for ( size_t n = 0; n < count; n++ )
|
||||||
{
|
{
|
||||||
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
|
GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
|
||||||
if ( width > ret.x )
|
if ( width > ret.x )
|
||||||
ret.x = width;
|
ret.x = width;
|
||||||
}
|
}
|
||||||
|
@@ -779,7 +779,7 @@ wxSize wxComboBox::DoGetBestSize() const
|
|||||||
size_t count = GetCount();
|
size_t count = GetCount();
|
||||||
for ( size_t n = 0; n < count; n++ )
|
for ( size_t n = 0; n < count; n++ )
|
||||||
{
|
{
|
||||||
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
|
GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
|
||||||
if ( width > ret.x )
|
if ( width > ret.x )
|
||||||
ret.x = width;
|
ret.x = width;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user