]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiNomenclature.cpp
Amend f441590c
[lyx.git] / src / frontends / qt4 / GuiNomenclature.cpp
index b6a795ee461fb1b2897d1c09ab01678bffe6b5e4..0a52bd1403b8bfff3566672e9857289698d0b4b7 100644 (file)
@@ -56,12 +56,24 @@ docstring GuiNomenclature::dialogToParams() const
        QString description = descriptionTE->toPlainText();
        description.replace('\n',"\\\\");
        params["description"] = qstring_to_ucs4(description);
-       return from_ascii(InsetNomencl::params2string(params));
+       return from_utf8(InsetNomencl::params2string(params));
 }
 
 
-bool GuiNomenclature::checkWidgets() const
+bool GuiNomenclature::initialiseParams(std::string const & data)
 {
+       InsetCommandParams p(insetCode());
+       if (!InsetCommand::string2params(data, p))
+               return false;
+       symbolED->setText(toqstr(p["symbol"]));
+       return true;
+}
+
+
+bool GuiNomenclature::checkWidgets(bool readonly) const
+{
+       symbolED->setReadOnly(readonly);
+       descriptionTE->setReadOnly(readonly);
        if (!InsetParamsWidget::checkWidgets())
                return false;
        QString const description = descriptionTE->toPlainText();