Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fc6e6d2

Browse files
authored
Merge pull request #36 from besnoi/patch-1
[Fix] Save File Bug
2 parents a69ee46 + 3eaabc1 commit fc6e6d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎notepad/notepad.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def dialog_critical(self, s):
123123
dlg.show()
124124

125125
def file_open(self):
126-
path, _ = QFileDialog.getOpenFileName(self, "Open file", "", "Text documents (*.txt);All files (*.*)")
126+
path, _ = QFileDialog.getOpenFileName(self, "Open file", "", "Text documents (*.txt);;All files (*.*)")
127127

128128
if path:
129129
try:
@@ -146,7 +146,7 @@ def file_save(self):
146146
self._save_to_path(self.path)
147147

148148
def file_saveas(self):
149-
path, _ = QFileDialog.getSaveFileName(self, "Save file", "", "Text documents (*.txt);All files (*.*)")
149+
path, _ = QFileDialog.getSaveFileName(self, "Save file", "", "Text documents (*.txt);;All files (*.*)")
150150

151151
if not path:
152152
# If dialog is cancelled, will return ''
@@ -185,4 +185,4 @@ def edit_toggle_wrap(self):
185185
app.setApplicationName("No2Pads")
186186

187187
window = MainWindow()
188-
app.exec_()
188+
app.exec_()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /