]> git.lyx.org Git - lyx.git/blobdiff - src/factory.C
the stuff from the sneak preview:
[lyx.git] / src / factory.C
index b0f443fdab9ed8ea3a06f3662e6510cce9fe6d71..10e11708e806e6fbd9bf639ed50b796f87982865 100644 (file)
@@ -154,7 +154,7 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
                // Try and generate a valid index entry.
                InsetCommandParams icp("index");
                string const contents = cmd.argument.empty() ?
-                       bv->getLyXText()->getStringToIndex() :
+                       bv->getLyXText()->getStringToIndex(bv->cursor()) :
                        cmd.argument;
                icp.setContents(contents);
 
@@ -182,11 +182,9 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
                return 0;
 
        case LFUN_INSET_CAPTION: {
-               UpdatableInset * up = bv->cursor().inset()
-                       ? bv->cursor().inset()->asUpdatableInset() : 0;
+               UpdatableInset * up = bv->cursor().inset().asUpdatableInset();
                if (!up) {
                        auto_ptr<InsetCaption> inset(new InsetCaption(params));
-                       inset->setOwner(up);
                        inset->setAutoBreakRows(true);
                        inset->setDrawFrame(InsetText::LOCKED);
                        inset->setFrameColor(LColor::captionframe);