mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
Fixed setting cursor positions with mouse for TextInsets and CollapsableInsets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1947 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7fd5660d5a
commit
c6e14e1536
@ -1,3 +1,7 @@
|
|||||||
|
2001-04-20 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
|
* insettext.C (Edit): call checkAndActivateInset with y=0 if y < 0.
|
||||||
|
|
||||||
2001-04-18 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
2001-04-18 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
* insetquotes.C (Latex): improve the guard against
|
* insetquotes.C (Latex): improve the guard against
|
||||||
|
@ -251,7 +251,7 @@ void InsetCollapsable::Edit(BufferView * bv, int xp, int yp,
|
|||||||
} else if (!collapsed) {
|
} else if (!collapsed) {
|
||||||
if (!bv->lockInset(this))
|
if (!bv->lockInset(this))
|
||||||
return;
|
return;
|
||||||
inset.Edit(bv, xp, yp+(top_baseline - inset.y()), button);
|
inset.Edit(bv, xp, yp + (top_baseline - inset.y()), button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -566,7 +566,8 @@ void InsetText::Edit(BufferView * bv, int x, int y, unsigned int button)
|
|||||||
inset_boundary = false;
|
inset_boundary = false;
|
||||||
inset_par = 0;
|
inset_par = 0;
|
||||||
old_par = 0;
|
old_par = 0;
|
||||||
if (!checkAndActivateInset(bv, x, y, button))
|
int tmp_y = (y < 0)?0:y;
|
||||||
|
if (!checkAndActivateInset(bv, x, tmp_y, button))
|
||||||
TEXT(bv)->SetCursorFromCoordinates(bv, x - drawTextXOffset,
|
TEXT(bv)->SetCursorFromCoordinates(bv, x - drawTextXOffset,
|
||||||
y + insetAscent);
|
y + insetAscent);
|
||||||
TEXT(bv)->sel_cursor = TEXT(bv)->cursor;
|
TEXT(bv)->sel_cursor = TEXT(bv)->cursor;
|
||||||
@ -737,7 +738,7 @@ void InsetText::InsetButtonPress(BufferView * bv, int x, int y, int button)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!inset && (button == 2)) {
|
if (!inset) { // && (button == 2)) {
|
||||||
bool paste_internally = false;
|
bool paste_internally = false;
|
||||||
if ((button == 2) && TEXT(bv)->selection) {
|
if ((button == 2) && TEXT(bv)->selection) {
|
||||||
LocalDispatch(bv, LFUN_COPY, "");
|
LocalDispatch(bv, LFUN_COPY, "");
|
||||||
|
Loading…
Reference in New Issue
Block a user