Commit 992ad2a7 by Jasper Floor Committed by Jeroen Hoffman

HSTCONFIGEDIT-204 for new sitemap items set the selected page design to the…

HSTCONFIGEDIT-204 for new sitemap items set the selected page design to the first item in the list - forward port of 203

(cherry picked from commit f070af49)
parent c19254a4
......@@ -272,14 +272,18 @@ public class DescriptionPicker extends Panel {
current = 0;
String selected = getDefaultModelObjectAsString();
if (selected != null) {
int cnt = 0;
for (Descriptive descriptive : descriptives) {
final String name = getName(descriptive);
if (selected.equals(name)) {
current = cnt;
break;
if (StringUtils.isEmpty(selected)) {
setDefaultModelObjectByCurrentSelection();
} else {
int cnt = 0;
for (Descriptive descriptive : descriptives) {
final String name = getName(descriptive);
if (selected.equals(name)) {
current = cnt;
break;
}
cnt++;
}
cnt++;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment