[Bug #1270] Fix issue invalidating TaskComponent

This is a quick fix for this issue but we should review it properly as
smartUpdate should be the best way to do this change instead of using
invalidate.

Moreover the methods updateTooltipText are not really updating the
tooltip so can cause some misunderstanding.

FEA: ItEr75S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2011-11-18 09:09:19 +01:00
parent 92311bc039
commit 22d19a8c83
2 changed files with 15 additions and 3 deletions

View file

@ -876,6 +876,8 @@ public class Planner extends HtmlMacroComponent {
TaskList taskList = getTaskList();
if (taskList != null) {
taskList.updateCompletion(progressType);
// FIXME Bug #1270
taskList.invalidate();
}
}

View file

@ -306,6 +306,9 @@ public class TaskComponent extends Div implements AfterCompose {
private transient PropertyChangeListener propertiesListener;
private IConstraintViolationListener<GanttDate> taskViolationListener;
// FIXME Bug #1270
private String progressType;
public TaskRow getRow() {
if (getParent() == null) {
throw new IllegalStateException(
@ -529,11 +532,13 @@ public class TaskComponent extends Div implements AfterCompose {
}
public void updateTooltipText() {
smartUpdate("taskTooltipText", task.updateTooltipText());
// FIXME Bug #1270
this.progressType = null;
}
public void updateTooltipText(String progressType) {
smartUpdate("taskTooltipText", task.updateTooltipText(progressType));
// FIXME Bug #1270
this.progressType = progressType;
}
private DependencyList getDependencyList() {
@ -567,7 +572,12 @@ public class TaskComponent extends Div implements AfterCompose {
}
public String getTooltipText() {
return task.getTooltipText();
// FIXME Bug #1270
if (progressType == null) {
return task.getTooltipText();
} else {
return task.updateTooltipText(progressType);
}
}
public String getLabelsText() {