ui,stats: fixed deleting rules

fix #1245

(cherry picked from commit 824b5c789a)
This commit is contained in:
Gustavo Iñiguez Goia 2025-01-05 00:10:39 +01:00
parent 00eec58906
commit 68e0afed70
Failed to generate hash of commit

View file

@ -843,9 +843,6 @@ class StatsDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
if nid == None:
return
self._notifications_sent[nid] = noti
# FIXME: we shouldn't refresh the view here. We should wait for a
# notification reply on self._cb_notification_callback
self._refresh_active_table()
# https://stackoverflow.com/questions/40225270/copy-paste-multiple-items-from-qtableview-in-pyqt4
def _copy_selected_rows(self):
@ -1277,6 +1274,8 @@ class StatsDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
name = model.index(idx.row(), self.COL_R_NAME).data()
node = model.index(idx.row(), self.COL_R_NODE).data()
self._del_rule(name, node)
self._refresh_active_table()
elif cur_idx == self.TAB_HOSTS or cur_idx == self.TAB_PROCS or cur_idx == self.TAB_ADDRS or \
cur_idx == self.TAB_USERS or cur_idx == self.TAB_PORTS:
do_refresh = False