diff options
2 files changed, 9 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java index 71302c2cb..6225cb33f 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java @@ -77,7 +77,7 @@ public class EditorUtil { public static final int MAXIMUM_HEIGHT = 140; - public static final int MAXIMUM_WIDTH = 500; + public static final int MAXIMUM_WIDTH = 300; // XXX why is this required? public static final Font TEXT_FONT = JFaceResources.getDefaultFont(); 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 c8629371b..de4b5cb2d 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 @@ -91,7 +91,7 @@ public class TaskPlanningEditor extends TaskFormPage { } }; - private final ITaskListChangeListener TASK_LIST_LISTENER = new TaskListChangeAdapter() { + private final ITaskListChangeListener taskListChangeListener = new TaskListChangeAdapter() { @Override public void containersChanged(Set<TaskContainerDelta> containers) { for (TaskContainerDelta taskContainerDelta : containers) { @@ -124,7 +124,7 @@ public class TaskPlanningEditor extends TaskFormPage { public TaskPlanningEditor(TaskEditor editor) { super(editor, ITasksUiConstants.ID_PAGE_PLANNING, Messages.TaskPlanningEditor_Planning); - TasksUiInternal.getTaskList().addChangeListener(TASK_LIST_LISTENER); + TasksUiInternal.getTaskList().addChangeListener(taskListChangeListener); } private void createContributions(final Composite editorComposite) { @@ -203,7 +203,7 @@ public class TaskPlanningEditor extends TaskFormPage { if (timingListener != null) { TasksUiPlugin.getTaskActivityManager().removeActivityListener(timingListener); } - TasksUiInternal.getTaskList().removeChangeListener(TASK_LIST_LISTENER); + TasksUiInternal.getTaskList().removeChangeListener(taskListChangeListener); super.dispose(); } @@ -266,6 +266,11 @@ public class TaskPlanningEditor extends TaskFormPage { } public void refresh() { + if (getManagedForm().getForm().isDisposed()) { + // editor possibly closed as part of submit + return; + } + getEditor().updateHeaderToolBar(); IFormPart[] parts = getManagedForm().getParts(); // refresh will not be invoked unless parts are stale |