lyxerr[Debug::INSETTEXT] << "InsetTabular::Cannot lock inset" << endl;
return;
}
+ finishUndo();
locked = true;
the_locking_inset = 0;
inset_x = 0;
actcell = tabular->GetNumberOfCells() - 1;
clearSelection();
resetPos(bv);
- finishUndo();
+ bv->fitCursor();
}
}
if (result < FINISHED) {
if (!the_locking_inset) {
-// showInsetCursor(bv);
+ if (bv->fitCursor())
+ updateLocal(bv, FULL, false);
+ if (locked)
+ showInsetCursor(bv);
}
} else
bv->unlockInset(this);
void InsetTabular::fitInsetCursor(BufferView * bv) const
{
if (the_locking_inset) {
+ int old_first_y = bv->text->first_y;
the_locking_inset->fitInsetCursor(bv);
+ if (old_first_y != bv->text->first_y)
+ need_update = FULL;
return;
}
LyXFont font;
int const asc = lyxfont::maxAscent(font);
int const desc = lyxfont::maxDescent(font);
- bv->fitLockedInsetCursor(cursor_.x(), cursor_.y(), asc, desc);
+ if (bv->fitLockedInsetCursor(cursor_.x(), cursor_.y(), asc, desc))
+ need_update = FULL;
}
{
if (the_locking_inset)
return the_locking_inset->insetAllowed(code);
- return false;
+ // we return true here because if the inset is not locked someone
+ // wants to insert something in one of our insettexts and we generally
+ // allow to do so.
+ return true;
}