|| storeSortInfo.getDirection() != info.getDirection()) {
int index = cm.indexOf(config);
if (index != -1) {
updateSortIcon(index, info.getDirection());
}
grid.fireEvent(new SortChangeEvent(new SortInfoBean(info.getPath(), info.getDirection())));
}
}
}
storeSortInfo = info;
}
}
} else {
List<? extends SortInfo> infos = grid.getLoader().getSortInfo();
if (infos.size() > 0) {
SortInfo info = infos.get(0);
String p = info.getSortField();
if (p != null && !"".equals(p)) {
ColumnConfig<M, ?> config = cm.findColumnConfig(p);
if (config != null) {
if (sortState == null || (!sortState.getSortField().equals(p))
|| sortState.getSortDir() != info.getSortDir()) {
int index = cm.indexOf(config);
if (index != -1) {
updateSortIcon(index, info.getSortDir());
}
grid.fireEvent(new SortChangeEvent(info));
}
}
sortState = info;
}
}