Bug #1587: Fix issue only resetting index of progress combo if it has items

FEA: ItEr77S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-12-04 09:42:30 +01:00
parent 2c51ef98a1
commit 9937f00e76

View file

@ -643,7 +643,9 @@ public class Planner extends HtmlMacroComponent {
diagramGraph.removePostGraphChangeListener(showAdvanceOnChange);
showAdvancesButton.setSclass("planner-command");
showAdvancesButton.setTooltiptext(_("Show progress"));
progressTypesCombo.setSelectedIndex(0);
if (progressTypesCombo.getItemCount() > 0) {
progressTypesCombo.setSelectedIndex(0);
}
} else {
context.showAdvances();
diagramGraph.addPostGraphChangeListener(showAdvanceOnChange);