diff --git a/src/ui/groupcombobox.cc b/src/ui/groupcombobox.cc index dc6c3e63b..03ca7537a 100644 --- a/src/ui/groupcombobox.cc +++ b/src/ui/groupcombobox.cc @@ -46,9 +46,10 @@ void GroupComboBox::fill( Instances::Groups const & groups ) shortcuts.clear(); - QFontMetrics metrics( font() ); - int size = metrics.height(); - setIconSize( QSize( size, size ) ); + int size = height(); + if ( size > 0 ) { + setIconSize( QSize( size, size ) ); + } for ( unsigned x = 0; x < groups.size(); ++x ) { addItem( groups[ x ].makeIcon(), groups[ x ].name, groups[ x ].id );