- case LFUN_INSET_CAPTION:
- if (bv->theLockingInset()) {
- lyxerr << "Locking inset code: "
- << static_cast<int>(bv->theLockingInset()->lyxCode());
- auto_ptr<InsetCaption> inset(new InsetCaption(params));
- inset->setOwner(bv->theLockingInset());
- inset->setAutoBreakRows(true);
- inset->setDrawFrame(InsetText::LOCKED);
- inset->setFrameColor(LColor::captionframe);
- return inset.release();
- }
- return 0;
+ case LFUN_CAPTION_INSERT: {
+ auto_ptr<InsetCaption> inset(new InsetCaption(params));
+ inset->setAutoBreakRows(true);
+ inset->setDrawFrame(true);
+ inset->setFrameColor(LColor::captionframe);
+ return inset.release();
+ }