+ // try current cell
+ //xarray().boundingBox(xlow, xhigh, ylow, yhigh);
+ //if (up)
+ // yhigh = yo - 4;
+ //else
+ // ylow = yo + 4;
+ //if (bruteFind(xo, yo, xlow, xhigh, ylow, yhigh)) {
+ // lyxerr << "updown: handled by brute find in the same cell\n";
+ // return true;
+ //}
+
+ // try to find an inset that knows better then we
+ while (1) {
+ ///lyxerr << "updown: We are in " << *par() << " idx: " << idx() << '\n';
+ // ask inset first
+ if (par()->idxUpDown(idx(), up)) {
+ // we found a cell that thinks it has something "below" us.
+ ///lyxerr << "updown: found inset that handles UpDown\n";
+ xarray().boundingBox(xlow, xhigh, ylow, yhigh);
+ // project (xo,yo) onto proper box
+ ///lyxerr << "\n xo: " << xo << " yo: " << yo
+ /// << "\n xlow: " << xlow << " ylow: " << ylow
+ /// << "\n xhigh: " << xhigh << " yhigh: " << yhigh;
+ xo = min(max(xo, xlow), xhigh);
+ yo = min(max(yo, ylow), yhigh);
+ ///lyxerr << "\n xo2: " << xo << " yo2: " << yo << "\n";
+ bruteFind(xo, yo, xlow, xhigh, ylow, yhigh);
+ ///lyxerr << "updown: handled by final brute find\n";
+ return true;
+ }