Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2015-03-11 18:44:07 +0000
committerGerrit Code Review @ Eclipse.org2015-03-16 17:52:29 +0000
commit5386bb0f2e272965f9ee1ebe8f117d301f325c26 (patch)
tree6d851002eefe5cc70b149e3f8a9b8c37c8c0667a /org.eclipse.mylyn.tasks.ui
parenta26e2ec4abd72c0b14c96fd634264677dcd1497f (diff)
downloadorg.eclipse.mylyn.tasks-5386bb0f2e272965f9ee1ebe8f117d301f325c26.tar.gz
org.eclipse.mylyn.tasks-5386bb0f2e272965f9ee1ebe8f117d301f325c26.tar.xz
org.eclipse.mylyn.tasks-5386bb0f2e272965f9ee1ebe8f117d301f325c26.zip
378032: BooleanAttributeEditor should initialize attribute to false
Change-Id: I29c92306b8055e6d9867f77ef222f1d301020443 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=378032
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