mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
Don't call edit() on not higly editable insets if we're just called edit().
In Highly editable inset we have to to enter it with the cursor (fix #387). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4155 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ed8a3124f3
commit
9e534c8750
@ -1,3 +1,11 @@
|
|||||||
|
2002-05-14 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
|
* insettext.C (edit): tell checkAndActivateInset() that we don't
|
||||||
|
have a button press.
|
||||||
|
(checkAndActivateInset): if button < 0 we don't have a button press
|
||||||
|
on the inset and os we won't call edit on it if it's not a Highly
|
||||||
|
editable inset (then we have to enter it).
|
||||||
|
|
||||||
2002-05-13 Juergen Vigna <jug@sad.it>
|
2002-05-13 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* insetcollapsable.C (insetButtonRelease): returned wrong return
|
* insetcollapsable.C (insetButtonRelease): returned wrong return
|
||||||
|
@ -695,7 +695,10 @@ void InsetText::edit(BufferView * bv, int x, int y, unsigned int button)
|
|||||||
lt = getLyXText(bv);
|
lt = getLyXText(bv);
|
||||||
clear = true;
|
clear = true;
|
||||||
}
|
}
|
||||||
if (!checkAndActivateInset(bv, x, tmp_y, button)) {
|
// we put here -1 and not button as now the button in the
|
||||||
|
// edit call should not be needed we will fix this in 1.3.x
|
||||||
|
// cycle hopefully (Jug 20020509)
|
||||||
|
if (!checkAndActivateInset(bv, x, tmp_y, -1)) {
|
||||||
lt->setCursorFromCoordinates(bv, x - drawTextXOffset,
|
lt->setCursorFromCoordinates(bv, x - drawTextXOffset,
|
||||||
y + insetAscent);
|
y + insetAscent);
|
||||||
lt->cursor.x_fix(lt->cursor.x());
|
lt->cursor.x_fix(lt->cursor.x());
|
||||||
@ -2067,6 +2070,11 @@ bool InsetText::checkAndActivateInset(BufferView * bv, int x, int y,
|
|||||||
int dummyx = x;
|
int dummyx = x;
|
||||||
int dummyy = y + insetAscent;
|
int dummyy = y + insetAscent;
|
||||||
Inset * inset = bv->checkInsetHit(getLyXText(bv), dummyx, dummyy);
|
Inset * inset = bv->checkInsetHit(getLyXText(bv), dummyx, dummyy);
|
||||||
|
// we only do the edit() call if the inset was hit by the mouse
|
||||||
|
// or if it is a highly editable inset. So we should call this
|
||||||
|
// function from our own edit with button < 0.
|
||||||
|
if (button < 0 && !isHighlyEditableInset(inset))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (inset) {
|
if (inset) {
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user