Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mjishnu committed Feb 14, 2023
1 parent b9b6310 commit b20c2b7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/maingui.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def __init__(self):
self.threadpool = QThreadPool()
self.url = None
self.stop = Event()
self.window_open = True
self.ignore_ver = False
self.all_dependencies = False

Expand Down Expand Up @@ -212,6 +211,12 @@ def install_url(self):
window.exec()

def openWindow(self):
#close event for the new window
def close(event):
self.window.deleteLater()
del self.window
event.accept()

try:
self.window # checking if self.window already exist
except:
Expand All @@ -226,12 +231,14 @@ def openWindow(self):
self.window.setWindowIcon(QIcon('./data/images/search.png'))
search_app = url_window()
search_app.setupUi(self.window)
#overding the new window close event for proper cleanup
self.window.closeEvent = close
self.window.show()
search_app.closed.connect(self.parser)

def parser(self, arg):
self.stop.clear()
# closing the window
# if the window is open closing it before starting the parser
try:
self.window.close()
self.window.deleteLater()
Expand Down

0 comments on commit b20c2b7

Please sign in to comment.