Skip to content

Commit

Permalink
ui, events: improved displaying the events window
Browse files Browse the repository at this point in the history
When loading and setting the query limit configured, it was causing to
fire an unwanted combobox event, resulting in a DB query without limits,
which in turns with a lot of events was causing slowdowns when displaying
the events window.
  • Loading branch information
gustavo-iniguez-goya committed Jul 26, 2022
1 parent 2a6afcb commit 4ab4fbf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/opensnitch/dialogs/stats.py
Expand Up @@ -643,8 +643,10 @@ def _load_settings(self):
if dialog_general_limit_results != None:
# XXX: a little hack, because if the saved index is 0, the signal is not fired.
# XXX: this causes to fire the event twice
self.limitCombo.blockSignals(True);
self.limitCombo.setCurrentIndex(4)
self.limitCombo.setCurrentIndex(int(dialog_general_limit_results))
self.limitCombo.blockSignals(False);

rules_splitter_pos = self._cfg.getSettings(Config.STATS_RULES_SPLITTER_POS)
if type(rules_splitter_pos) == QtCore.QByteArray:
Expand Down

0 comments on commit 4ab4fbf

Please sign in to comment.