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

old global settings should be updated instead of reset #35

Open
Crackvignoule opened this issue Feb 13, 2025 · 0 comments
Open

old global settings should be updated instead of reset #35

Crackvignoule opened this issue Feb 13, 2025 · 0 comments
Labels
enhancement New feature or request pyside

Comments

@Crackvignoule
Copy link
Collaborator

Before commit a63858d, when a global setting (QSetting, stored in OS registry) name were changed in the code it could result in the app not starting cause the setting would no longer exist. For example if the click mode has been renamed from 'fitting' to 'peaks'. Due to this change, line
radio_button = getattr(self.view.toolbar, f"{self.model.click_mode}_radio")
would try to get 'fitting_radio' attr but no longer exists since its now 'peaks_radio', that was causing a crash.

Image

In commit a63858d I implemented a temp fix that detects when fitspy has been updated and proceeds with a settings reset.

Ideally, _check_version would not reset settings but instead update settings keys to keep user settings.

@Crackvignoule Crackvignoule added enhancement New feature or request pyside labels Feb 13, 2025
@Crackvignoule Crackvignoule added this to the Code Rework 01/2025 milestone Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pyside
Projects
None yet
Development

No branches or pull requests

1 participant