GUI: fix project saving
This fixes two bugs occurring on project saving.
-
After saving project the asterisk in window title didn't disappear. This bug was introduced after the recent refactoring.
-
After adding real data to the project, it should be saved twice, otherwise data are not loaded correctly afterwards. This was an old bug caused by updating the data file name variables AFTER writing the information to the project file.