haesleinhuepf / napari-script-editor

A python script editor plugin for napari

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Save button does not remember directory

tischi opened this issue · comments

....it currently always starts in the .napari-scripts folder and does not remember the users recent choice.

Hi Christian @tischi ,

that's a feature and not a bug because scripts in that folder become menu entries once you restart napari.

I'll keep that issue open to see what others think.

Thanks for reporting!

Best,
Robert

I am fine with this being the initial folder when starting a new napari.

But when you work on a script and you just want to save the changes it is very tedious to always locate it again. In fact, normally you just want to hit Ctrl+S and don't navigate anywhere.

Again the idea was to motivate users to save their scripts to that folder.

If anybody wants work on this and build in a better logic, this line would be good starting point:

filename, _ = QFileDialog.getSaveFileName(parent=self, filter="*.py", directory=_init_scripts_directory())