diff --git a/src/frontends/qt4/GuiInfo.cpp b/src/frontends/qt4/GuiInfo.cpp index dcc5ee9855..8994b9431e 100644 --- a/src/frontends/qt4/GuiInfo.cpp +++ b/src/frontends/qt4/GuiInfo.cpp @@ -90,6 +90,16 @@ docstring GuiInfo::dialogToParams() const } +bool GuiInfo::checkWidgets(bool readonly) const +{ + nameLE->setReadOnly(readonly); + typeCO->setEnabled(!readonly); + if (!InsetParamsWidget::checkWidgets()) + return false; + return !nameLE->text().isEmpty(); +} + + } // namespace frontend } // namespace lyx diff --git a/src/frontends/qt4/GuiInfo.h b/src/frontends/qt4/GuiInfo.h index 8911172c0a..4d3e296531 100644 --- a/src/frontends/qt4/GuiInfo.h +++ b/src/frontends/qt4/GuiInfo.h @@ -35,6 +35,7 @@ private: FuncCode creationCode() const { return LFUN_INFO_INSERT; } void paramsToDialog(Inset const *); docstring dialogToParams() const; + bool checkWidgets(bool readonly = false) const; //@} };