Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-07-28 19:59:58 +0000
committerSteffen Pingel2011-07-28 19:59:58 +0000
commit598fbdec94f09d32ac731b8dbbb049ffcc8bd389 (patch)
tree4b2c534608471f4e290cc8fcb6e711634ee507e9 /org.eclipse.mylyn.tasks.ui
parentb22e0b6707755ea77ce321bec5604dfb381a3890 (diff)
downloadorg.eclipse.mylyn.tasks-598fbdec94f09d32ac731b8dbbb049ffcc8bd389.tar.gz
org.eclipse.mylyn.tasks-598fbdec94f09d32ac731b8dbbb049ffcc8bd389.tar.xz
org.eclipse.mylyn.tasks-598fbdec94f09d32ac731b8dbbb049ffcc8bd389.zip
NEW - bug 350561: [editor] text appears backwards when using large text
box https://bugs.eclipse.org/bugs/show_bug.cgi?id=350561
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java23
1 files changed, 18 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java
index d581f8e41..724052024 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java
@@ -36,7 +36,9 @@ public class LongTextAttributeEditor extends AbstractAttributeEditor {
private SourceViewer viewer;
- private boolean cflowModify;
+ boolean ignoreNotification;
+
+ boolean suppressRefresh;
public LongTextAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
super(manager, taskAttribute);
@@ -68,8 +70,13 @@ public class LongTextAttributeEditor extends AbstractAttributeEditor {
text.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TREE_BORDER);
text.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- setValue(text.getText());
- CommonFormUtil.ensureVisible(text);
+ try {
+ suppressRefresh = true;
+ setValue(text.getText());
+ CommonFormUtil.ensureVisible(text);
+ } finally {
+ suppressRefresh = false;
+ }
}
});
}
@@ -89,12 +96,18 @@ public class LongTextAttributeEditor extends AbstractAttributeEditor {
@Override
public void refresh() {
if (viewer.getTextWidget() != null && !viewer.getTextWidget().isDisposed()) {
- viewer.getDocument().set(getValue());
+ try {
+ ignoreNotification = true;
+ viewer.getDocument().set(getValue());
+ } finally {
+ ignoreNotification = false;
+ }
}
}
@Override
public boolean shouldAutoRefresh() {
- return true;
+ return !suppressRefresh;
}
+
}

Back to the top