Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-03-12 20:01:02 -0400
committerspingel2009-03-12 20:01:02 -0400
commitb30cffcb364e118d9e0ff748c47ece5aee491d69 (patch)
tree7e2091c1449e2718ea0b27fd15c9e78977bda623
parent48f530e5bb819f59ba975d317c5979f4f590cef3 (diff)
downloadorg.eclipse.mylyn.tasks-b30cffcb364e118d9e0ff748c47ece5aee491d69.tar.gz
org.eclipse.mylyn.tasks-b30cffcb364e118d9e0ff748c47ece5aee491d69.tar.xz
org.eclipse.mylyn.tasks-b30cffcb364e118d9e0ff748c47ece5aee491d69.zip
NEW - bug 260472: unsaved changed summary of local task is discarded if task is moved
https://bugs.eclipse.org/bugs/show_bug.cgi?id=260472
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
index 9f1686968..ac12ac5ac 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
@@ -157,6 +157,7 @@ public class TaskPlanningEditor extends TaskFormPage {
}
});
}
+ break;
}
}
}
@@ -172,6 +173,8 @@ public class TaskPlanningEditor extends TaskFormPage {
private CommonTextSupport textSupport;
+ private boolean summaryChanged;
+
public TaskPlanningEditor(TaskEditor editor) {
super(editor, ITasksUiConstants.ID_PAGE_PLANNING, Messages.TaskPlanningEditor_Planning);
this.parentEditor = editor;
@@ -223,10 +226,8 @@ public class TaskPlanningEditor extends TaskFormPage {
}
if (!summaryEditor.getTextWidget().isDisposed()) {
- if (!summaryEditor.getTextWidget().getText().equals(updateTask.getSummary())) {
- boolean wasDirty = TaskPlanningEditor.this.isDirty;
+ if (!summaryChanged) {
summaryEditor.getTextWidget().setText(updateTask.getSummary());
- TaskPlanningEditor.this.markDirty(wasDirty);
}
if (parentEditor != null) {
parentEditor.updateHeaderToolBar();
@@ -400,6 +401,7 @@ public class TaskPlanningEditor extends TaskFormPage {
summaryEditor.addTextListener(new ITextListener() {
public void textChanged(TextEvent event) {
if (!task.getSummary().equals(summaryEditor.getTextWidget().getText())) {
+ summaryChanged = true;
markDirty(true);
}
}
@@ -574,6 +576,9 @@ public class TaskPlanningEditor extends TaskFormPage {
}
private void markDirty(boolean dirty) {
+ if (!dirty) {
+ summaryChanged = false;
+ }
isDirty = dirty;
getManagedForm().dirtyStateChanged();
}

Back to the top