mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-12 01:08:17 +03:00
Fix questionSaveMBox close on non-Windows platform
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -638,7 +638,7 @@ class UserServersQTableWidget(QTranslatable, AppQTableWidget):
|
||||
self.testDownloadSpeedTimer.timeout.connect(self.handleTestDownloadSpeedJob)
|
||||
|
||||
# Text Editor Window
|
||||
self.textEditorWindow = TextEditorWindow()
|
||||
self.textEditorWindow = TextEditorWindow(parent=self.parent())
|
||||
|
||||
# Must set before flush all
|
||||
self.setColumnCount(len(self.Headers))
|
||||
|
||||
@@ -115,7 +115,7 @@ class TextEditorWindow(AppQMainWindow):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.customWindowTitle = ''
|
||||
self.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
|
||||
self.setWindowModality(QtCore.Qt.WindowModality.WindowModal)
|
||||
self.setFixedSize(450, int(450 * GOLDEN_RATIO))
|
||||
|
||||
# Current editing index
|
||||
@@ -273,12 +273,16 @@ class TextEditorWindow(AppQMainWindow):
|
||||
assert isinstance(saveMBox, QuestionSaveMBox)
|
||||
|
||||
if saveMBox.button0 == button:
|
||||
# Save
|
||||
if self.save():
|
||||
saveMBox.close()
|
||||
self.hide()
|
||||
if saveMBox.button1 == button:
|
||||
elif saveMBox.button1 == button:
|
||||
# Discard
|
||||
self.markAsSaved()
|
||||
saveMBox.close()
|
||||
self.hide()
|
||||
if saveMBox.button2 == button:
|
||||
elif saveMBox.button2 == button:
|
||||
# Cancel. Do nothing
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user