From d6b7fd7a6b0ffa6f7a3e57fceaa8b96ffb274015 Mon Sep 17 00:00:00 2001 From: Rebecca Breu Date: Sun, 26 Nov 2023 14:25:09 +0100 Subject: [PATCH] Let 'Save as' pre-select the folder of the currently opened file --- CHANGELOG.rst | 4 +++- beeref/view.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b496f7c..e4e1eb8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,10 +8,12 @@ Added small images and images with an alpha channel will be stored as PNG, the rest as JPG. In the newly created settings dialog, this behaviour can be changed to always use PNG (the former behaviour) or - always JPG. + always JPG. To apply this behaviour to your old bee files, you can + save them as new files. * Antialias/smoothing for displaying images. For images being displayed at a large zoom factor, smoothing will turn off to make sure that icons, pixel sprites etc can be viewed correctly. +* "Save as" will now open pre-select the folder of the currently opened file Fixed diff --git a/beeref/view.py b/beeref/view.py index 5a9d345..4d995e7 100644 --- a/beeref/view.py +++ b/beeref/view.py @@ -366,9 +366,11 @@ def do_save(self, filename, create_new): def on_action_save_as(self): self.scene.cancel_crop_mode() + directory = os.path.dirname(self.filename) if self.filename else None filename, f = QtWidgets.QFileDialog.getSaveFileName( parent=self, caption='Save file', + directory=directory, filter=f'{constants.APPNAME} File (*.bee)') if filename: self.do_save(filename, create_new=True)