void BufferView::Pimpl::toggleSelection(bool b)
{
- if (screen_.get())
+ if (screen_.get()) {
+ if (bv_->theLockingInset())
+ bv_->theLockingInset()->toggleSelection(bv_, b);
screen_->toggleSelection(bv_->text, bv_, b);
+ }
}
}
break;
- case LFUN_OPENSTUFF:
+ case LFUN_INSET_TOGGLE:
{
LyXText * lt = bv_->getLyXText();
hideCursor();
beforeChange(lt);
update(lt, BufferView::SELECT|BufferView::FITCUR);
- lt->openStuff(bv_);
+ lt->toggleInset(bv_);
update(lt, BufferView::SELECT|BufferView::FITCUR);
setState();
}
// if we are in a locking inset we should try to insert the
// inset there otherwise this is a illegal function now
if (bv_->theLockingInset()) {
- if (bv_->theLockingInset()->insertInsetAllowed(inset))
+ if (bv_->theLockingInset()->insetAllowed(inset))
return bv_->theLockingInset()->insertInset(bv_, inset);
return false;
}