VSpace, that use InsetParamsWidget, so we cannot have code that requires
InsetCommandParams there.
Stephen Witt reported a similar crash with the info dialog.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35952
a592a061-630c-0410-9148-
cb99ea01b6c8
{
InsetLabel const * label = static_cast<InsetLabel const *>(inset);
InsetCommandParams const & params = label->params();
- paramsToDialog(params);
-}
-
-
-void GuiLabel::paramsToDialog(InsetCommandParams const & params)
-{
keywordED->setText(toqstr(params["name"]));
}
}
+bool GuiLabel::initialiseParams(std::string const & data)
+{
+ InsetCommandParams p(insetCode());
+ if (!InsetCommand::string2params(data, p))
+ return false;
+ keywordED->setText(toqstr(p["name"]));
+ return true;
+}
+
+
bool GuiLabel::checkWidgets() const
{
if (!InsetParamsWidget::checkWidgets())
InsetCode insetCode() const { return LABEL_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
void paramsToDialog(Inset const *);
- void paramsToDialog(InsetCommandParams const & params);
docstring dialogToParams() const;
bool checkWidgets() const;
+ bool initialiseParams(std::string const &);
//@}
};
#include "ui_PrintNomenclUi.h"
namespace lyx {
+
+class InsetCommandParams;
+
namespace frontend {
class GuiPrintNomencl : public InsetParamsWidget, public Ui::PrintNomenclUi
\r
#include "InsetParamsWidget.h"\r
\r
-#include "insets/InsetCommand.h"\r
-\r
#include "qt_helpers.h"\r
\r
#include <QLineEdit>\r
return valid;\r
}\r
\r
-\r
-bool InsetParamsWidget::initialiseParams(std::string const & data)\r
-{\r
- InsetCommandParams p(insetCode());\r
- if (!InsetCommand::string2params(data, p))\r
- return false;\r
- paramsToDialog(p);\r
- return true;\r
-}\r
-\r
} // namespace frontend\r
} // namespace lyx\r
\r