Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPart.java13
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties2
2 files changed, 11 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPart.java
index e96b06cc3..5160ece34 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPart.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPart.java
@@ -437,7 +437,6 @@ public class PlanningPart extends AbstractLocalEditorPart {
toolkit.adapt(activeTimeText, true, false);
activeTimeText.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
activeTimeText.setBackground(null);
- updateActiveTime();
activeTimeText.setEditable(false);
ImageHyperlink resetActivityTimeButton = toolkit.createImageHyperlink(activeTimeComposite, SWT.NONE);
@@ -456,11 +455,13 @@ public class PlanningPart extends AbstractLocalEditorPart {
}
}
});
+ updateActiveTime();
}
private void updateActiveTime() {
boolean show = MonitorUiPlugin.getDefault().isActivityTrackingEnabled() && isActiveTimeEnabled();
long elapsedTime = TasksUiInternal.getActiveTime(getTask());
+ boolean visible = activeTimeComposite != null && activeTimeComposite.isVisible();
if (show && (elapsedTime > 0 || getTask().isActive())) {
if (activeTimeComposite != null && !activeTimeComposite.isVisible()) {
activeTimeComposite.setVisible(true);
@@ -473,12 +474,17 @@ public class PlanningPart extends AbstractLocalEditorPart {
}
activeTimeText.setText(elapsedTimeString);
} else {
- if (activeTimeComposite != null && activeTimeComposite.isVisible()) {
+ if (activeTimeComposite != null) {
((GridData) activeTimeComposite.getLayoutData()).exclude = true;
activeTimeComposite.getParent().layout();
activeTimeComposite.setVisible(false);
}
}
+ if (!needsNotes() && visible != (activeTimeComposite != null && activeTimeComposite.isVisible())) {
+ if (page instanceof AbstractTaskEditorPage) {
+ ((AbstractTaskEditorPage) page).reflow();
+ }
+ }
}
private Composite createComposite(Composite parent, int col, FormToolkit toolkit) {
@@ -638,7 +644,8 @@ public class PlanningPart extends AbstractLocalEditorPart {
DateRange date = getTask().getScheduledForDate();
if (date != null) {
scheduledLabel.setText(getLabel(date));
- scheduledLabel.setToolTipText(NLS.bind(Messages.PlanningPart_Scheduled_for_X_Tooltip, date.toString()));
+ scheduledLabel.setToolTipText(NLS.bind(Messages.PlanningPart_Scheduled_for_X_Tooltip,
+ date.toString()));
} else {
scheduledLabel.setText(""); //$NON-NLS-1$
scheduledLabel.setToolTipText(null);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties
index 1289c894a..97daaac0d 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties
@@ -101,7 +101,7 @@ TaskEditorPlanningPart_Due=Due:
TaskEditorPlanningPart_Estimated=Estimate:
TaskEditorPlanningPart_Scheduled=Scheduled:
TaskEditorPlanningPart_TaskEditorPlanningPart_tooltip=Contents are stored locally, not\n submitted to the repository.
-TaskEditorPlanningPart_Time_working_on_this_task=Time working on this task
+TaskEditorPlanningPart_Time_working_on_this_task=Time spent working on this task
TaskEditorRichTextPart_Browser_Preview=Browser Preview
TaskEditorRichTextPart_Edit_Tooltip=Edit

Back to the top