Skip to content

Commit 58ca1c0

Browse files
fix: replace showEvent override with show method in stats dialog
This change modifies the StatsDialog class to use the show() method instead of overriding showEvent(). This resolves a recursion error. Changes made: - Replaced the showEvent() method override with a show() method - Maintained the same functionality including: - Emitting the _shown_trigger signal - Setting window state to active and unminimized - Updating the window title with version information - Removed the event parameter since show() doesn't receive event arguments - Preserved all existing logic for address checking and window title formatting Co-authored-by: Gustavo Iñiguez Goia <[email protected]>
1 parent 6cd5af5 commit 58ca1c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/opensnitch/dialogs/stats.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,8 +849,8 @@ def changeEvent(self, event):
849849
# docs: https://doc.qt.io/qt-5/qwidget.html#setWindowState
850850
self.setWindowState(self.windowState() & ~QtCore.Qt.WindowState.WindowMinimized | QtCore.Qt.WindowState.WindowActive)
851851

852-
def showEvent(self, event):
853-
super(StatsDialog, self).showEvent(event)
852+
def show(self):
853+
super(StatsDialog, self).show()
854854
self._shown_trigger.emit()
855855
window_title = QC.translate("stats", "OpenSnitch Network Statistics {0}").format(version)
856856
if self._address is not None:

0 commit comments

Comments
 (0)