Persisted main view columns settings easily break if default column change

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • 3.0.0a3
    • Affects Version/s: None
    • Component/s: User Interface
    • None

      The underlying issue is that the persistence relies in QHeaderView saveState and restoreState. This stores an opaque binary structure based on the internal model, which is heavily based on the logical index of columns.

      If we add or remove default columns in Picard or change default column order this breaks the logical indices of the columns, and restoring the state can lead to unexpected results. Such as in this example with an existing configuration:

      After adding a view default columns the view was restored like this when starting Picard:

      The next start would result in the default column setup to be shown.

      As a result we might be forced to reset the persisted state on changes, as we e.g. did in 3.0.0dev4.

      The better approach would be to base the persisted configuration on our column names and persist a structure that we can manipulate if needed.

            Assignee:
            Philipp Wolfer
            Reporter:
            Philipp Wolfer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Version Package
                3.0.0a3