mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix insetButtonPress in InsetText the same way as in Bufferview_pimpl.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3892 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fb94708472
commit
c04225fdf1
@ -651,6 +651,7 @@ void BufferView::Pimpl::workAreaButtonPress(int xpos, int ypos,
|
||||
inset->insetButtonPress(bv_, xpos, ypos, button);
|
||||
return;
|
||||
}
|
||||
// I'm not sure we should continue here if we hit an inset (Jug20020403)
|
||||
|
||||
// Right click on a footnote flag opens float menu
|
||||
if (button == 3) {
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-04-03 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* insettext.C (insetButtonPress): fix insetButtonPress events the same
|
||||
way as in Bufferview_pimpl.
|
||||
|
||||
2002-04-03 Allan Rae <rae@lyx.org>
|
||||
|
||||
* insetgraphics.C (latex): one % too many makes living on the bleeding
|
||||
|
@ -937,7 +937,9 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button)
|
||||
y - inset_y,
|
||||
button);
|
||||
return;
|
||||
} else if (inset) {
|
||||
}
|
||||
#if 0
|
||||
else if (inset) {
|
||||
// otherwise unlock the_locking_inset and lock the new inset
|
||||
the_locking_inset->insetUnlock(bv);
|
||||
inset_x = cx(bv) - top_x + drawTextXOffset;
|
||||
@ -950,6 +952,7 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button)
|
||||
updateLocal(bv, CURSOR, false);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
// otherwise only unlock the_locking_inset
|
||||
the_locking_inset->insetUnlock(bv);
|
||||
the_locking_inset = 0;
|
||||
@ -959,16 +962,13 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button)
|
||||
|
||||
if (bv->theLockingInset()) {
|
||||
if (isHighlyEditableInset(inset)) {
|
||||
// We just have to lock the inset before calling a
|
||||
// PressEvent on it!
|
||||
UpdatableInset * uinset = static_cast<UpdatableInset*>(inset);
|
||||
inset_x = cx(bv) - top_x + drawTextXOffset;
|
||||
inset_y = cy(bv) + drawTextYOffset;
|
||||
inset_pos = cpos(bv);
|
||||
inset_par = cpar(bv);
|
||||
inset_boundary = cboundary(bv);
|
||||
the_locking_inset = uinset;
|
||||
uinset->insetButtonPress(bv, x - inset_x, y - inset_y,
|
||||
button);
|
||||
uinset->edit(bv, x - inset_x, y - inset_y, 0);
|
||||
if (!bv->lockInset(uinset)) {
|
||||
lyxerr[Debug::INSETS] << "Cannot lock inset" << endl;
|
||||
}
|
||||
inset->insetButtonPress(bv, x - inset_x, y - inset_y, button);
|
||||
if (the_locking_inset)
|
||||
updateLocal(bv, CURSOR, false);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user