* src/insets/insettabular.C (update): fixed cursor setting when
the_locking_inset changed.
(draw): made this a bit cleaner.
+ (InsetButtonPress): fixed!
* various files: added LyXText Parameter to fitCursor call.
tabular->GetAdditionalHeight(cell);
}
if (the_locking_inset == tabular->GetCellInset(cell)) {
- cx = nx + tabular->GetBeginningOfTextInCell(cell);
LyXText::text_status st = bv->text->status;
do {
+ cx = nx + tabular->GetBeginningOfTextInCell(cell);
bv->text->status = st;
if (need_update == CELL) {
// clear before the inset
}
if (the_locking_inset) {
the_locking_inset->update(bv, font, reinit);
- resetPos(bv);
- inset_x = cursor.x() - top_x + tabular->GetBeginningOfTextInCell(actcell);
- inset_y = cursor.y();
+// resetPos(bv);
+// inset_x = cursor.x() - top_x + tabular->GetBeginningOfTextInCell(actcell);
+// inset_y = cursor.y();
}
switch(need_update) {
case INIT:
bool const inset_hit = InsetHit(bv, x, y);
if ((ocell == actcell) && the_locking_inset && inset_hit) {
+ cursor.pos(0); // always before the inset!
+ resetPos(bv);
the_locking_inset->InsetButtonPress(bv,
x - inset_x, y - inset_y, button);
return;
// the cursor.pos has to be before the inset so if it isn't now just
// reset the curor pos first!
if (!cellstart(cursor.pos())) {
- cursor.pos((cursor.pos() - 1) % 2);
+ cursor.pos(0);
resetPos(bv);
}
UpdatableInset * inset =