diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index 774f8f0e3f..10f5de5d72 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -1039,8 +1039,19 @@ public class FindWindow extends Window implements EventListener, ValueCha listItem.appendChild(cellQueryTo); listItem.appendChild(cellRightBracket); - advancedPanel.appendChild(listItem); - advancedPanel.setSelectedItem(listItem); + int selectedIndex = advancedPanel.getSelectedIndex(); + if (selectedIndex >= 0) + { + ListItem item = advancedPanel.getItemAtIndex(selectedIndex + 1); + advancedPanel.insertBefore(listItem, item); + } + else + { + advancedPanel.appendChild(listItem); + } + + advancedPanel.setSelectedItem(listItem); + if (fields != null){ // QueryFrom