Author: scabanovich
Date: 2010-10-25 06:10:32 -0400 (Mon, 25 Oct 2010)
New Revision: 26024
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XChildrenEditor.java
Log:
JBIDE-7395
https://jira.jboss.org/browse/JBIDE-7395
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XChildrenEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XChildrenEditor.java 2010-10-25
10:03:11 UTC (rev 26023)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XChildrenEditor.java 2010-10-25
10:10:32 UTC (rev 26024)
@@ -142,6 +142,9 @@
public void setObject(XModelObject object) {
helper.setModelObject(object);
+ if(xtable != null && xtable.getTable() != null &&
xtable.getSelectionIndex() < 0 && xtable.getTable().getItemCount() > 0) {
+ xtable.getTable().select(0);
+ }
}
protected boolean areUpDounActionsEnabled() {
@@ -347,6 +350,7 @@
for (int i = 0; i < helper.size(); i++) {
if(helper.getModelObject(i) == object) {
xtable.setSelection(i);
+ updateBar();
return;
}
}