]> git.lyx.org Git - features.git/commitdiff
Implement GuiNomenclature::initialiseParams(), thus restoring the
authorRichard Heck <rgheck@comcast.net>
Sun, 11 Sep 2011 14:14:04 +0000 (14:14 +0000)
committerRichard Heck <rgheck@comcast.net>
Sun, 11 Sep 2011 14:14:04 +0000 (14:14 +0000)
ability to take the symbol from an explicit or implicit selection.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39651 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiNomenclature.cpp
src/frontends/qt4/GuiNomenclature.h

index 92250a7b27efd312cc5cd18d5067aaf013b7662a..7415f7f3dff3f21c446a3ddc4adb4f9cb2cb3ea1 100644 (file)
@@ -60,6 +60,16 @@ docstring GuiNomenclature::dialogToParams() 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() const
 {
        if (!InsetParamsWidget::checkWidgets())
index 502f8de53a8041dbac89a686a5b396ad72447bfd..dcdd10fab32506e90cf2d7b6dc81372d1e412312 100644 (file)
@@ -36,6 +36,7 @@ private:
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets() const;
+       bool initialiseParams(std::string const &);
        //@}
 };