Fix inset creation, the inset name code was already passed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33357 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2010-02-07 22:11:32 +00:00
parent 1eed486fc4
commit 63504dc21c

View File

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