Aha, now I think I know why @eht16 did it - just noticed that this signal is 
also used in the filebrowser plugin. When "use the project's base directory" is 
enabled, the "project-save" signal is used to update the directory in the file 
browser (this signal is probably used so it gets updated also when base path 
changes in project's config). But you don't want to change the directory when 
closing the project.

One way to fix it with the new behavior is to have a flag that is set in 
"project-before-close" and reset in "project-close" handler to indicate whether 
project closing happens.

But maybe it would be even better to simply remove the "project-save" handler 
and do the directory change only in "project-open" - I'm not sure if it's a 
good idea to change the directory when project settings gets updated (imagine 
you changed the directory to some subdirectory of the project because you work 
there and just want to update a command-line flag of the compiler in settings - 
and BAM, your directory is changed).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1400#issuecomment-281097024

Reply via email to