From: Abdelrazak Younes Date: Sun, 7 Feb 2010 22:11:32 +0000 (+0000) Subject: Fix inset creation, the inset name code was already passed. X-Git-Tag: 2.0.0~4127 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=63504dc21c0da0d648ec15d3626ebe1bb3aff06c;p=features.git 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 --- diff --git a/src/frontends/qt4/InsetDialog.cpp b/src/frontends/qt4/InsetDialog.cpp index e31eed7314..ce2056a373 100644 --- a/src/frontends/qt4/InsetDialog.cpp +++ b/src/frontends/qt4/InsetDialog.cpp @@ -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