Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 7831570c authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 30c75554
......@@ -349,8 +349,9 @@ void KTNEFMain::optionDefaultDir()
void KTNEFMain::viewSelectionChanged()
{
const QList<KTNEFAttach *> list = mView->getSelection();
bool on1 = ( list.count() == 1 );
bool on2 = ( list.count() > 0 );
const int nbItem = list.count();
const bool on1 = ( nbItem == 1 );
const bool on2 = ( nbItem > 0 );
actionCollection()->action( QLatin1String("view_file") )->setEnabled( on1 );
actionCollection()->action( QLatin1String("view_file_as") )->setEnabled( on1 );
......
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