[Bug #1269] Fix previous commit as it was not working properly
FEA: ItEr75S04BugFixing
This commit is contained in:
parent
6cbf124938
commit
4edfd0f2ab
2 changed files with 7 additions and 18 deletions
|
|
@ -873,7 +873,10 @@ public class Planner extends HtmlMacroComponent {
|
|||
}
|
||||
|
||||
public void updateCompletion(String progressType) {
|
||||
getTaskList().updateCompletion(progressType);
|
||||
TaskList taskList = getTaskList();
|
||||
if (taskList != null) {
|
||||
taskList.updateCompletion(progressType);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,13 +164,9 @@ public class CompanyPlanningController implements Composer {
|
|||
|
||||
cbProgressTypes.setVisible(true);
|
||||
|
||||
Comboitem item = findListitemValue(cbProgressTypes,
|
||||
getProgressTypeFromConfiguration());
|
||||
|
||||
if (item != null) {
|
||||
cbProgressTypes.setSelectedItem(item);
|
||||
planner.updateCompletion(((ProgressType) item.getValue())
|
||||
.toString());
|
||||
ProgressType progressType = getProgressTypeFromConfiguration();
|
||||
if (progressType != null) {
|
||||
planner.updateCompletion(progressType.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -185,16 +181,6 @@ public class CompanyPlanningController implements Composer {
|
|||
}
|
||||
}
|
||||
|
||||
private Comboitem findListitemValue(Combobox listbox, ProgressType value) {
|
||||
for (Object each : listbox.getChildren()) {
|
||||
final Comboitem item = (Comboitem) each;
|
||||
if (value.equals(item.getValue())) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ProgressType getProgressTypeFromConfiguration() {
|
||||
return model.getProgressTypeFromConfiguration();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue