Commit 1a571b05 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 8dfd4a10
......@@ -808,11 +808,11 @@ void KMFilterListBox::loadFilterList( bool createDummyFilter )
// disabled dialog (usability tests indicated that the new-filter
// button is too hard to find that way):
const int numberOfItem( mListWidget->count() );
if ( !numberOfItem && createDummyFilter ) {
slotNew();
}
if ( numberOfItem > 0 ) {
if ( numberOfItem == 0 ) {
if (createDummyFilter ) {
slotNew();
}
} else {
mListWidget->setCurrentRow( 0 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment