]> git.lyx.org Git - features.git/commitdiff
Fix InsetQuotes creation. Not very clean but it does the job. Andre, I think we shoul...
authorAbdelrazak Younes <younes@lyx.org>
Thu, 28 Feb 2008 15:24:37 +0000 (15:24 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 28 Feb 2008 15:24:37 +0000 (15:24 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23324 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text3.cpp

index f40d37f8d86ce504f7a725550eb42b90f08ce959..1e4d6fa272e750f454e2e29b9635cb54c945d2d4 100644 (file)
@@ -1114,14 +1114,15 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        else
                                c = par.getChar(pos - 1);
                        string arg = to_utf8(cmd.argument());
+                       InsetQuotes * iq;
                        if (arg == "single")
-                               cur.insert(new InsetQuotes(c,
-                                   bufparams.quotes_language,
-                                   InsetQuotes::SingleQ));
+                               iq = new InsetQuotes(c, bufparams.quotes_language,
+                                       InsetQuotes::SingleQ);
                        else
-                               cur.insert(new InsetQuotes(c,
-                                   bufparams.quotes_language,
-                                   InsetQuotes::DoubleQ));
+                               iq = new InsetQuotes(c, bufparams.quotes_language,
+                                       InsetQuotes::DoubleQ);
+                       iq->setBuffer(bv->buffer());
+                       cur.insert(iq);
                        cur.posForward();
                }
                else