return;
} else {
el = el.jjtGetParent();
}
}
ASTContext voice = el.getParentContext().getContext(ASTContext.TYPE_VOICE);
ASTContext staff = voice.getContext(ASTContext.TYPE_STAFF);
int v = staff.childContexts.indexOf(voice);
int s = staff.number - 1;
LayoutCalculator calc = ((ASTScore) el.getParentContext().getContext(ASTContext.TYPE_SCORE)).layoutCalculator;
int line = calc.getLine(el);
ASTContext toSearch = null;
if (v < staff.childContexts.size() - 1) {
toSearch = staff.childContexts.get(v + 1);
} else if (s < staff.getParentContext().childContexts.size() - 1) {
toSearch = staff.getParentContext().childContexts.get(s + 1).childContexts.get(0);
} else {//next Line
if (line >= calc.getLinePosition().length) {
return;
} else {
line++;
ASTScore score = (ASTScore) el.getParentContext().getContext(ASTContext.TYPE_SCORE);
// int nx = calc.getLinePosition()[line][0].x - calc.getLinePosition()[line - 1][0].x;
// nx = UpdateNodeTask.getInstance().getLastCurrent().getlayoutObject().x + nx;
int nx = (int) UpdateNodeTask.getInstance().getLastCurrent().getlayoutObject().centre.getX();
ASTContext con = score.childContexts.get(0).childContexts.get(0);
if (con.type == ASTContext.TYPE_STAFF)//STAFFGROUP beetween
{
con = con.childContexts.get(0);
}
selectNext(con, nx, line, true);