From c9d01933e8a90f3ffeba5b70562bf60f9807e094 Mon Sep 17 00:00:00 2001 From: Isa Nanic <isa.nanic@savoirfairelinux.com> Date: Mon, 10 Dec 2018 13:09:40 -0500 Subject: [PATCH] ux: disable combobox if only one account is present Change-Id: I1d842cc9a1cf64e4c1bf02b4744ff06be78780e3 Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> --- currentaccountcombobox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/currentaccountcombobox.cpp b/currentaccountcombobox.cpp index a9888b4..6d68860 100644 --- a/currentaccountcombobox.cpp +++ b/currentaccountcombobox.cpp @@ -176,7 +176,9 @@ void CurrentAccountComboBox::mousePressEvent(QMouseEvent* mouseEvent) { if (!gearLabel_.frameGeometry().contains(mouseEvent->localPos().toPoint())) { - QComboBox::mousePressEvent(mouseEvent); + if (count() > 1) { + QComboBox::mousePressEvent(mouseEvent); + } } else { emit settingsButtonClicked(); } -- GitLab