Rainbow: Custom Configuration directory sometimes resets

Issue #314 new
Former user created an issue

Original issue 314 created by @ysavourel on 2013-02-16T20:11:49.000Z:

This may end up being related to issue #111, but the symptom is different.

To reproduce:
- Open Rainbow
- Tools > Filter Configurations. Change the Custom Configuration directory setting. Close the dialog.
- Add a file to the file list.
- Tools > Filter Configurations. The Custom Configuration directory setting will have reverted to its original value.

Repeating this process multiple times doesn't reliably cause the problem -- it seems like it may only revert the setting the first time you add a file to the file list.

Comments (4)

  1. Former user Account Deleted

    Comment 1. originally posted by @ysavourel on 2013-02-19T05:48:19.000Z:

    This looks like it's because of MainForm.updateCustomConfigurations() clobbering the fcMapper's custom config directory.

  2. Former user Account Deleted

    Comment 2. originally posted by @ysavourel on 2013-02-19T19:59:55.000Z:

    Just to capture some extra thoughts. The basic issue is that the custom configuration directory is considered part of the rainbow project. However, when Rainbow is first opened, there is no implicit project defined. Instead, the project is created when the first file is added to the file list, at which point the project root is tied to the location of that file. (Alternately, the project may be opened, etc.) When the project root is set, the custom config settings are updated to match it. So if the user had set the custom filter config dir immediately upon opening Rainbow, that change will be clobbered when the project is created/opened.

    There are a few possible solutions. A simple but hacky fix would be for the custom config dir to only be updated by the project root if it was not already changed from its default value. A better approach might be for the custom config dir to be stored as a separate part of the project settings, independent of the project root.

  3. Former user Account Deleted

    Comment 3. originally posted by @ysavourel on 2013-02-20T00:47:57.000Z:

    The second approach would be probably better in the long run.
    And I suppose we still could make the project root the default if the custom configuration directory is not present.

  4. Log in to comment