+2004-02-16 Alfredo Braunstein <abraunst@lyx.org>
+
+ * text2.C (setCursorFromCoordinates): switch to absolute coords
+ (cursorUp): adjust
+ (cursorDown): adjust
+ * text3.C (dispatch): adjust
+
2004-02-16 André Pönitz <poenitz@gmx.net>
* cursor.[Ch]: use new '_void_ dispatch(...)' signature (see
//inset yet. I personally think it's ok. (ab)
return this;
}
-
-//if (y <= yo() + inset.ascent() + button_dim.y2)
-// y = yo();
-//else
-// y += inset.ascent() - height_collapsed();
return inset.editXY(cur, x, y);
}
}
-// x,y are coordinates relative to this LyXText
+// x,y are absolute coordinates
void LyXText::setCursorFromCoordinates(LCursor & cur, int x, int y)
{
+ x -= xo_;
+ y -= yo_;
CursorSlice old_cursor = cur.current();
ParagraphList::iterator pit;
Row const & row = *getRowNearY(y, pit);
Row const & row = cur.textRow();
int x = cur.x_target();
int y = cursorY(cur.current()) - row.baseline() - 1;
- setCursorFromCoordinates(cur, x - xo_, y - yo_);
+ setCursorFromCoordinates(cur, x, y);
if (!selecting) {
InsetBase * inset_hit = checkInsetHit(cur.x_target(), y);
Row const & row = cur.textRow();
int x = cur.x_target();
int y = cursorY(cur.current()) - row.baseline() + row.height() + 1;
- setCursorFromCoordinates(cur, x - xo_, y - yo_);
+ setCursorFromCoordinates(cur, x, y);
if (!selecting) {
InsetBase * inset_hit = checkInsetHit(cur.x_target(), y);
// Clear the selection
cur.clearSelection();
- setCursorFromCoordinates(cur, cmd.x - xo_, cmd.y - yo_);
+ setCursorFromCoordinates(cur, cmd.x, cmd.y);
cur.resetAnchor();
finishUndo();
cur.x_target() = cursorX(cur.current());