Open dglent opened 7 years ago
Hi, some times i find useful to save the current file in another place but with the same file name. What do you think about this ?
diff --git a/enki/core/document.py b/enki/core/document.py index 4b3acb8..769e496 100644 --- a/enki/core/document.py +++ b/enki/core/document.py @@ -391,7 +391,11 @@ class Document(QWidget): def saveFileAs(self): """Ask for new file name with dialog. Save file """ - path, _ = QFileDialog.getSaveFileName(self, self.tr('Save file as...')) + if self._filePath: + default_filename = os.path.basename(self._filePath) + else: + default_filename = '' + path, _ = QFileDialog.getSaveFileName(self, self.tr('Save file as...'), default_filename) if not path: return
Hi
I like the idea. Open a pull request with this code.
Hi, some times i find useful to save the current file in another place but with the same file name. What do you think about this ?