From 7824e2e314af65f8d0e4db8888c08bd698fd1059 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Thu, 8 Apr 2010 02:35:39 +0000 Subject: [PATCH] bug 307520: Save build console toggle does not work when first being pressed Patch from Dmitry Kozlov --- .../cdt/internal/ui/buildconsole/SaveConsoleAction.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/SaveConsoleAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/SaveConsoleAction.java index e4523053329..e7ac77293e9 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/SaveConsoleAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/SaveConsoleAction.java @@ -57,10 +57,11 @@ public class SaveConsoleAction extends Action { Shell shell = fConsolePage.getControl().getShell(); String id = "org.eclipse.cdt.managedbuilder.ui.properties.Page_head_build"; //$NON-NLS-1$ PreferenceDialog d = PreferencesUtil.createPropertyDialogOn(shell, project, id, new String[] { id }, null); - int result = d.open(); - if ( result == Window.CANCEL ) { - setChecked(false); - } + d.open(); + BuildOutputLogger.SaveBuildOutputPreferences newBp = + BuildOutputLogger.readSaveBuildOutputPreferences(project); + setChecked(newBp.isSaving); + return; } } bp.isSaving = isChecked();