Skip to content

Commit db07fcb

Browse files
committed
Show theme-default checkbox only when workbench theme actually changed
The restart dialog opened from the Appearance preferences page showed a "Use as default theme" checkbox whenever theming was enabled, even when the only change was an unrelated setting such as monitor-specific UI scaling or the colors-and-fonts theme. Gate the checkbox on the workbench theme having actually changed in this performOk() call. Fixes #4003
1 parent b58e3b4 commit db07fcb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,11 @@ public boolean performOk() {
508508
boolean showRestartDialog = false;
509509
String restartDialogTitle = null;
510510
String restartDialogMessage = null;
511+
boolean themeChanged = false;
511512

512513
if (isThemingPossible()) {
513514
ITheme theme = getSelectedTheme();
514-
boolean themeChanged = theme != null && !theme.equals(currentTheme);
515+
themeChanged = theme != null && !theme.equals(currentTheme);
515516
boolean colorsAndFontsThemeChanged = !PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getId()
516517
.equals(currentColorsAndFontsTheme.getId());
517518

@@ -546,7 +547,7 @@ public boolean performOk() {
546547

547548
if (showRestartDialog) {
548549
String themeId = null;
549-
if (isThemingPossible()) {
550+
if (themeChanged) {
550551
ITheme theme = getSelectedTheme();
551552
if (theme != null) {
552553
themeId = theme.getId();

0 commit comments

Comments
 (0)