Let 'Save as' pre-select the folder of the currently opened file

This commit is contained in:
Rebecca Breu 2023-11-26 14:25:09 +01:00
parent 608787d9a9
commit d6b7fd7a6b
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -366,9 +366,11 @@ class BeeGraphicsView(MainControlsMixin,
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)