mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[ui][settings] fix memory cleaning
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import gc
|
||||
from io import StringIO
|
||||
|
||||
from PyQt5 import sip
|
||||
from PyQt5.QtCore import QSize, Qt
|
||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QToolBar, QSizePolicy, QPushButton
|
||||
|
||||
@@ -52,14 +51,13 @@ class SettingsWindow(QWidget):
|
||||
|
||||
def closeEvent(self, event):
|
||||
if self.window and self.window.settings_window == self:
|
||||
sip.delete(self.window.settings_window)
|
||||
self.deleteLater()
|
||||
self.window.settings_window = None
|
||||
elif self.tray and self.tray.settings_window == self:
|
||||
sip.delete(self.tray.settings_window)
|
||||
self.deleteLater()
|
||||
self.tray.settings_window = None
|
||||
|
||||
gc.collect()
|
||||
event.accept()
|
||||
|
||||
def handle_display(self):
|
||||
if self.isMinimized():
|
||||
|
||||
Reference in New Issue
Block a user