From dd89509b1c94ac1121ebfa81814d4ac60209b3ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20I=C3=B1iguez=20Goia?= Date: Mon, 16 Dec 2024 23:50:36 +0100 Subject: [PATCH] ui,stats: don't allow clicking on empty hosts In the Events tab, don't allow double clicking on the DstHost column if the cell is empty. --- ui/opensnitch/dialogs/stats.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/opensnitch/dialogs/stats.py b/ui/opensnitch/dialogs/stats.py index c26b57e2..eba1a5ad 100644 --- a/ui/opensnitch/dialogs/stats.py +++ b/ui/opensnitch/dialogs/stats.py @@ -1907,6 +1907,8 @@ class StatsDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]): self.IN_DETAIL_VIEW[cur_idx] = True rowdata = row.model().index(row.row(), self.COL_DSTHOST).data() host = rowdata + if host == "": + return self.LAST_SELECTED_ITEM = host self.tabWidget.setCurrentIndex(cur_idx) self._set_active_widgets(True, host)