-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
11565 confirmation dialog for reset preferences and fixes #25400
base: master
Are you sure you want to change the base?
11565 confirmation dialog for reset preferences and fixes #25400
Conversation
…erences" button is clicked
…ation dialog of Reset Preferences
//! NOTE To change the language at the moment, a restart is required | ||
m_needRestartToApplyLanguageChange = true; | ||
m_needRestartToApplyLanguageChange = newLanguageCode != m_activeLanguageCode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed to make the "Restart required" text go away if the user restores the language explicitly or via Reset preferences to the currently active language. Currently, once this text appears, it won't go away.
@@ -95,6 +95,13 @@ void Settings::reset(bool keepDefaultSettings, bool notifyAboutChanges) | |||
m_settings->clear(); | |||
|
|||
m_isTransactionStarted = false; | |||
|
|||
std::vector<Settings::Key> locallyAddedKeys; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made these changes because it turned out that some settings without a value are not present in m_items
. If the user opens the Preferences dialog, all settings are switched to m_localSettings
. If the user sets a value of a missing setting, it will be created in m_localSettings
. Then, if the user resets the preferences without closing the dialog, change notifications will be sent out for the settings in m_items
, i.e. any settings added in m_localSettings
will be missed and thefore not updated on the dialog. Two examples of such settings are: Score -> Style for part (PART_STYLE_FILE_PATH
in the code) and Import -> Style file (STYLE_FILE_IMPORT_PATH_KEY
in the code).
@@ -41,7 +41,12 @@ BaseSection { | |||
QtObject { | |||
id: prv | |||
|
|||
property bool useStyleFile: root.styleFileImportPath !== "" | |||
property bool useStyleFileExplicitlySet: root.styleFileImportPath !== "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes were needed to properly update the Styles used for import controls on the Import page and fix these two bugs:
1. Open the Preferences dialog and navigate to the Import page.
2. Change Style used for import from Built-in style to Use style file.
3. Type a file if you want or skip this step.
4. Click Reset Preferences without closing the dialog.
Result: the Use style file radiobutton remains selected.
AND:
1. Open the Preferences dialog and navigate to the Import page.
2. Change Style used for import from Built-in style to Use style file.
3. Type something in the file textbox.
4. Delete the text in the file textbox.
Result: the Built-in style radiobutton becomes selected.
8f244fd
to
a23448e
Compare
a23448e
to
628dfa7
Compare
Resolves: #11565
I've added some comments below (in this PR) with more info and observations.