+ if (bv->the_locking_inset) {
+ if ((par->GetChar(cursor.pos) == LyXParagraph::META_INSET) &&
+ par->GetInset(cursor.pos) &&
+ (par->GetInset(cursor.pos)->Editable() == Inset::HIGHLY_EDITABLE)) {
+ UpdatableInset *inset =
+ static_cast<UpdatableInset*>(par->GetInset(cursor.pos));
+ inset_x = cursor.x - top_x + drawTextXOffset;
+ inset_y = cursor.y + drawTextYOffset;
+ inset->InsetButtonPress(bv, x-inset_x, y-inset_y, button);
+ inset->Edit(bv, x-inset_x, y-inset_y, 0);
+ UpdateLocal(bv, true);
+ }
+ }
+ selection_start_cursor = selection_end_cursor = cursor;
+}
+
+
+void InsetText::InsetButtonRelease(BufferView * bv, int x, int y, int button)
+{
+ UpdatableInset * inset = 0;
+
+ if (the_locking_inset) {
+ the_locking_inset->InsetButtonRelease(bv, x-inset_x, y-inset_y,button);
+ } else {
+ if (par->GetChar(cursor.pos) == LyXParagraph::META_INSET) {
+ inset = static_cast<UpdatableInset*>(par->GetInset(cursor.pos));
+ if (inset->Editable()==Inset::HIGHLY_EDITABLE) {
+ inset->InsetButtonRelease(bv, x-inset_x, y-inset_y,button);
+ } else {
+ inset_x = cursor.x - top_x + drawTextXOffset;
+ inset_y = cursor.y + drawTextYOffset;
+ inset->InsetButtonRelease(bv, x-inset_x, y-inset_y,button);
+ inset->Edit(bv, x-inset_x, y-inset_y, button);
+ }
+ }
+ }
+ no_selection = false;