From b42bfae2237dfe0f180985b230f8b919c1101065 Mon Sep 17 00:00:00 2001 From: rooosyf Date: Thu, 29 Dec 2022 16:24:07 +0100 Subject: [PATCH] ui: session: removed sgnSaveImports and changes on closeEvent --- eddy/ui/session.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/eddy/ui/session.py b/eddy/ui/session.py index 0b832a21..3f0d8223 100644 --- a/eddy/ui/session.py +++ b/eddy/ui/session.py @@ -34,7 +34,6 @@ import os -import sqlite3 import sys import textwrap from collections import OrderedDict @@ -288,7 +287,6 @@ class Session( sgnProjectSaved = QtCore.pyqtSignal() sgnQuit = QtCore.pyqtSignal() sgnReady = QtCore.pyqtSignal() - sgnSaveImports = QtCore.pyqtSignal() sgnSaveProject = QtCore.pyqtSignal() sgnNoSaveProject = QtCore.pyqtSignal() sgnUpdateState = QtCore.pyqtSignal() @@ -2659,7 +2657,6 @@ def doSave(self) -> None: msgbox.setWindowTitle('Save failed!') msgbox.exec_() else: - self.sgnSaveImports.emit() self.undostack.setClean() self.sgnProjectSaved.emit() @@ -2690,7 +2687,6 @@ def doSaveAs(self) -> None: msgbox.setWindowTitle('Save failed!') msgbox.exec_() else: - self.sgnSaveImports.emit() self.undostack.setClean() self.sgnProjectSaved.emit() @@ -3463,7 +3459,6 @@ def closeEvent(self, closeEvent: QtGui.QCloseEvent) -> None: """ close = True save = False - notSave = False if not self.undostack.isClean(): msgbox = QtWidgets.QMessageBox(self) msgbox.setIconPixmap(QtGui.QIcon(':/icons/48/ic_help_outline_black').pixmap(48)) @@ -3477,7 +3472,7 @@ def closeEvent(self, closeEvent: QtGui.QCloseEvent) -> None: close = False elif msgbox.result() == QtWidgets.QMessageBox.No: save = False - notSave = True + self.sgnNoSaveProject.emit() elif msgbox.result() == QtWidgets.QMessageBox.Yes: save = True @@ -3487,9 +3482,6 @@ def closeEvent(self, closeEvent: QtGui.QCloseEvent) -> None: # SAVE THE CURRENT PROJECT IF NEEDED if save: self.sgnSaveProject.emit() - else: - if notSave: - self.sgnNoSaveProject.emit() # DISPOSE ALL THE PLUGINS for plugin in self.plugins(): self.pmanager.dispose(plugin)