Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create QGIS.ini.bkp and undo changes with Cancel #48503

Open
1 of 2 tasks
jack-sprat opened this issue May 10, 2022 · 1 comment
Open
1 of 2 tasks

create QGIS.ini.bkp and undo changes with Cancel #48503

jack-sprat opened this issue May 10, 2022 · 1 comment

Comments

@jack-sprat
Copy link

What is the bug or the crash?

As documented and warned, changes to Advanced settings in Settings > Options > Advanced are implemented immediately, with no 'Undo' facility.

This kind of undermines the purpose of the 'Cancel' button in the Options Editor, so it would be great if this reverted to previous settings.

In order to enable this (or in lieu, I guess), and to reduce the impact of accidental changes (like I just managed even whilst carefully trying add a new symbol path), it is surely possible to save previous settings to a backup file - I'd suggest multiple sequentially-numbered files, one per editing session, e.g. QGIS.ini.000.bkp, QGIS.ini.001.bkp, &c. There are unlikely to ever be so many changes made to cause a storage issue.

Steps to reproduce the issue

  1. Settings > Options > Advanced
  2. click through warning to be verra verra careful...
  3. trepidatiously alter setting, only to realise it has not appended additional configuration, but deleted and replaced default - who knew...
  4. click Cancel. Fruitlessly.
  5. default setting is lost :-(

Versions

v3.18.0-Zurich

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@jack-sprat jack-sprat added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 10, 2022
@alexbruy alexbruy removed the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 11, 2022
@AlisterH
Copy link
Contributor

AlisterH commented Apr 16, 2024

There are other cases where it is useful to have old copies of the settings e.g. if you unwittingly run the new QT6 builds with an existing QGIS profile all your old plugins are disabled. If you run a QT5 build again you need to manually re-enable them. Similarly, over the years when running nightly builds occasionally I encounter a problem that causes a whole lot of plugins to fail to load, and be disabled.

it is surely possible to save previous settings to a backup file - I'd suggest multiple sequentially-numbered files, one per editing session

I believe every time a setting is written a new settings file is created, then the old one is deleted and the new one put in its place - I think the junk I see here might be new settings files being written and then something going wrong and interrupting the process:
image
So it might be fairly easy to archive the old settings file each time instead of deleting it. That alone wouldn't provide the easy undo you're looking for, but it would at least allow you to investigate old settings if necessary.
In my dream world settings would be kept in a system that tracks changes, so you can see what setting was changed when... maybe the answer is to use a system like Nix, instead of expecting this to be implemented by applications (QGIS) or toolkits (QT).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants