[Fix] Save File Bug

Added double semicolons where needed #typofix
This commit is contained in:
Neir Besnoi
2022-08-05 14:19:31 +05:30
committed by GitHub
parent aaf6038ab4
commit 3eaabc125d

View File

@@ -123,7 +123,7 @@ class MainWindow(QMainWindow):
dlg.show()
def file_open(self):
path, _ = QFileDialog.getOpenFileName(self, "Open file", "", "Text documents (*.txt);All files (*.*)")
path, _ = QFileDialog.getOpenFileName(self, "Open file", "", "Text documents (*.txt);;All files (*.*)")
if path:
try:
@@ -146,7 +146,7 @@ class MainWindow(QMainWindow):
self._save_to_path(self.path)
def file_saveas(self):
path, _ = QFileDialog.getSaveFileName(self, "Save file", "", "Text documents (*.txt);All files (*.*)")
path, _ = QFileDialog.getSaveFileName(self, "Save file", "", "Text documents (*.txt);;All files (*.*)")
if not path:
# If dialog is cancelled, will return ''