Commit 48ddccb5 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent af8ebdd9
......@@ -212,9 +212,9 @@ void CustomTemplates::load()
item->setText( 0, indexToType( type ) );
iconFromType( type, item );
}
mUi->mRemove->setEnabled( mUi->mList->topLevelItemCount() > 0 && mUi->mList->currentItem() );
mUi->mDuplicate->setEnabled( mUi->mList->topLevelItemCount() > 0 && mUi->mList->currentItem() );
const bool enabled = mUi->mList->topLevelItemCount() > 0 && mUi->mList->currentItem();
mUi->mRemove->setEnabled( enabled );
mUi->mDuplicate->setEnabled( enabled );
}
void CustomTemplates::save()
......
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