int location = getCurrentLocation();
FeatureNode parent = target.getParent();
if (location == LOCATION_BEFORE) {
- position = parent.getIndex(target) - 1;
+ position = Math.max(0, parent.getIndex(target) - 1);
target = parent;
}
// cannot drop a feature node onto itself
for (Object droppedObject : droppedObjects) {
if (droppedObject == null) {
- StoreUtil
- .warningDialog(
+ StoreUtil.warningDialog(
"Operation not supported yet",
this,
"We are currently unable to change the order of freshly created "