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:
parent
9ec83f8da7
commit
2b1ff57f1e
@ -542,7 +542,7 @@ wxSize wxChoice::DoGetBestSize() const
|
||||
size_t count = GetCount();
|
||||
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 )
|
||||
ret.x = width;
|
||||
}
|
||||
|
@ -779,7 +779,7 @@ wxSize wxComboBox::DoGetBestSize() const
|
||||
size_t count = GetCount();
|
||||
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 )
|
||||
ret.x = width;
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ wxSize wxChoice::DoGetBestSize() const
|
||||
size_t count = GetCount();
|
||||
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 )
|
||||
ret.x = width;
|
||||
}
|
||||
|
@ -779,7 +779,7 @@ wxSize wxComboBox::DoGetBestSize() const
|
||||
size_t count = GetCount();
|
||||
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 )
|
||||
ret.x = width;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user