- the_locking_inset->insetButtonRelease(bv,
- x - inset_x, y - inset_y,
- button);
- } else {
- if (cpar(bv)->getChar(cpos(bv)) == Paragraph::META_INSET) {
- inset = static_cast<UpdatableInset*>(cpar(bv)->getInset(cpos(bv)));
- if (inset->editable() == Inset::HIGHLY_EDITABLE) {
- inset->insetButtonRelease(bv,
- x - inset_x,
- y - inset_y, button);
- } else {
- inset_x = cx(bv) - top_x + drawTextXOffset;
- inset_y = cy(bv) + drawTextYOffset;
- inset->insetButtonRelease(bv,
- x - inset_x,
- y - inset_y, button);
- inset->edit(bv,
- x - inset_x, y - inset_y, button);
- }
- updateLocal(bv, CURSOR_PAR, false);
+ return the_locking_inset->insetButtonRelease(bv,
+ x - inset_x, y - inset_y,
+ button);
+ }
+ int tmp_x = x - drawTextXOffset;
+ int tmp_y = y + insetAscent - getLyXText(bv)->first;
+ Inset * inset = bv->checkInsetHit(getLyXText(bv), tmp_x, tmp_y);
+ bool ret = false;
+ if (inset) {
+ if (isHighlyEditableInset(inset)) {
+ ret = inset->insetButtonRelease(bv, x - inset_x,
+ y - inset_y, button);
+ } else {
+ inset_x = cx(bv) - top_x + drawTextXOffset;
+ inset_y = cy(bv) + drawTextYOffset;
+ ret = inset->insetButtonRelease(bv, x - inset_x,
+ y - inset_y, button);
+ inset->edit(bv, x - inset_x,
+ y - inset_y, button);