Skip to content

Commit

Permalink
ui: session: removed sgnSaveImports and changes on closeEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
rooosyf committed Dec 29, 2022
1 parent d55f8e8 commit b42bfae
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions eddy/ui/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@


import os
import sqlite3
import sys
import textwrap
from collections import OrderedDict
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -2659,7 +2657,6 @@ def doSave(self) -> None:
msgbox.setWindowTitle('Save failed!')
msgbox.exec_()
else:
self.sgnSaveImports.emit()
self.undostack.setClean()
self.sgnProjectSaved.emit()

Expand Down Expand Up @@ -2690,7 +2687,6 @@ def doSaveAs(self) -> None:
msgbox.setWindowTitle('Save failed!')
msgbox.exec_()
else:
self.sgnSaveImports.emit()
self.undostack.setClean()
self.sgnProjectSaved.emit()

Expand Down Expand Up @@ -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))
Expand All @@ -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

Expand All @@ -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)
Expand Down

0 comments on commit b42bfae

Please sign in to comment.