- // we found a cell that think something "below" us.
- if (up) {
- if (par()->idxUp(idx()))
- break;
- } else {
- if (par()->idxDown(idx()))
- break;
+ ///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;