]> git.lyx.org Git - lyx.git/blobdiff - src/factory.C
reduce number of calls to LyXText::getFont
[lyx.git] / src / factory.C
index ad810c39af9f66d60e7e43c21de736c0773f222a..9b3258a59351e31c8699750d7f8949ac8ad1a471 100644 (file)
@@ -56,9 +56,6 @@
 #include "mathed/math_macrotemplate.h"
 #include "mathed/math_hullinset.h"
 
-#include "frontends/Dialogs.h"
-#include "frontends/LyXView.h"
-
 #include "support/lstrings.h"
 
 #include <boost/assert.hpp>
@@ -163,15 +160,8 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
                        cmd.argument;
                icp.setContents(contents);
 
-               string data = InsetCommandMailer::params2string("index", icp);
-               LyXView * lv = bv->owner();
+               return new InsetIndex(icp);
 
-               if (icp.getContents().empty()) {
-                       lv->getDialogs().show("index", data, 0);
-               } else {
-                       lv->dispatch(FuncRequest(LFUN_INSET_APPLY, data));
-               }
-               return 0;
        }
 
        case LFUN_TABULAR_INSERT:
@@ -183,7 +173,6 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
                        if (c <= 0) c = 2;
                        return new InsetTabular(*bv->buffer(), r, c);
                }
-               bv->owner()->getDialogs().show("tabularcreate");
                return 0;
 
        case LFUN_INSET_CAPTION: {