Handle not found fonts reliably
Check if the font isn't found when selecting (we seem to always have a selection even if we fail on GTK) and properly set the index of the final <not found> font name
This commit is contained in:
parent
90cd3286fa
commit
5c699e3c1e
|
@ -78,12 +78,12 @@ void FONT_CHOICE::SetFontSelection( KIFONT::FONT* aFont )
|
|||
}
|
||||
else
|
||||
{
|
||||
SetStringSelection( aFont->GetName() );
|
||||
bool result = SetStringSelection( aFont->GetName() );
|
||||
|
||||
if( GetSelection() == wxNOT_FOUND )
|
||||
if( !result )
|
||||
{
|
||||
Append( aFont->GetName() + m_notFound );
|
||||
SetSelection( GetCount() );
|
||||
SetSelection( GetCount() - 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue