Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java
index 4e2df2ffc..4b7d0606d 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java
@@ -19,6 +19,7 @@ import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
@@ -56,6 +57,17 @@ public class BooleanAttributeEditor extends AbstractAttributeEditor {
button.setToolTipText(getDescription());
refresh();
setControl(button);
+ if (!getTaskAttribute().hasValue()) {
+ // set initial value to false to match what the editor shows
+ // use asyncExec to ensure this happens after decorating, otherwise this appears as an incoming change
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (!getTaskAttribute().hasValue()) {
+ getAttributeMapper().setBooleanValue(getTaskAttribute(), false);
+ }
+ }
+ });
+ }
}
@Override

Back to the top