Page 1 of 1

Project does not save all source settings.

Posted: Tue Aug 18, 2009 2:04 am
by Rescator
Settings like CursorPosition and FirstLine and Folding are not saved in the project.

Test this by choosing "Save Settings To: Don't save anything" in the IDE prefs.

I was hoping to rely solely on project files from now on and get rid of "at end of" source settings, or directory config or file config. :(

Anyway, if those (are there more too?) settings are also saved in the project file then that would be kickass ;)

Posted: Tue Aug 18, 2009 2:58 am
by freak
This is by design actually.

You can open/close the sources independent of the project, so storing this kind of data in the project file would be counter productive:

- if you open the file before opening the project, none of the settings can be applied
- if you keep the file open longer to the project, any changes done after closing the project would be lost.

But most important of all: A source file can be part of multiple projects. So which project would you save the configuration to ?

Settings which are still saved in the source are those that belong to the source itself, like current line, first line, folding, cursor position and line markers.

Posted: Tue Aug 18, 2009 5:00 am
by Rescator
Then how about doing it this way:

* If the source has been changed, the project will get the current line, first line, folding, cursor position and line markers from the source and save those in the project.
* If the source has not been changed the project will use the current line, first line, folding, cursor position and line markers that is stored in the project.
* If the source is changed while in the project, current line, first line, folding, cursor position and line markers are saved in the project and the source.
* If the source is changed outside a project the current line, first line, folding, cursor position and line markers are saved in the source.

Does that sound logic? Unless I missed something this should give the best of both worlds.

Why am I so adamant about this? Well, because when a source is shared among two projects it is more likely that I am referencing different procedures in that source depending on which project it is.

Maybe not everybody would want this as default behavior, but I would at least want it an option for those that would, like me. :)