Skip to content

Commit

Permalink
adições de qualidade de vida
Browse files Browse the repository at this point in the history
  • Loading branch information
Davipcrs committed Jan 13, 2023
1 parent 93b792e commit e66b6f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions gui/textEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ def closeEvent(self, event):

if self.prevName == None or self.ui.mainEditor.toPlainText() != loadFile(self.prevName):
reply = QMessageBox.question(self, 'Fechar Janela', 'Tem certeza que vai fechar a janela? Existem modificações não salvas.', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
if reply == QMessageBox.Yes:
event.accept()
self.wClosed.emit(event.isAccepted)
#https://doc.qt.io/qtforpython/tutorials/basictutorial/signals_and_slots.html
else:
event.ignore()

else:
event.accept()
self.wClosed.emit(event.isAccepted)

if reply == QMessageBox.Yes:
event.accept()
self.wClosed.emit(event.isAccepted)
#https://doc.qt.io/qtforpython/tutorials/basictutorial/signals_and_slots.html

else:
event.ignore()

1 change: 0 additions & 1 deletion text/dwadawd.txt

This file was deleted.

0 comments on commit e66b6f3

Please sign in to comment.