]> git.lyx.org Git - features.git/commitdiff
Fix inset creation, the inset name code was already passed.
authorAbdelrazak Younes <younes@lyx.org>
Sun, 7 Feb 2010 22:11:32 +0000 (22:11 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 7 Feb 2010 22:11:32 +0000 (22:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33357 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/InsetDialog.cpp

index e31eed731452fa68f3b36a9d54e18ad0d7e28a87..ce2056a3730774f82493c72d68e50ca804d297bf 100644 (file)
@@ -70,10 +70,7 @@ void InsetDialog::on_closePB_clicked()
 \r
 void InsetDialog::on_newPB_clicked()\r
 {\r
-       docstring argument;\r
-       if (d->creation_code_ == LFUN_INSET_INSERT)\r
-               argument = from_ascii(insetName(d->inset_code_)) + " ";\r
-       argument += dialogToParams();\r
+       docstring const argument = dialogToParams();\r
        dispatch(FuncRequest(d->creation_code_, argument));\r
 }\r
 \r
@@ -102,6 +99,14 @@ void InsetDialog::updateView()
                paramsToDialog(i);\r
        else\r
                enableView(false);\r
+\r
+       //FIXME: the newPB push button cannot be accessed here and so cannot be\r
+       // disabled...\r
+       /*\r
+       docstring const argument = dialogToParams();\r
+       newPB->setEnabled(\r
+               getStatus(FuncRequest(LFUN_INSET_MODIFY, argument).enabled());\r
+       */\r
 }\r
 \r
 } // namespace frontend\r