]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathRef.cpp
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetMathRef.cpp
index 998653b38b68fe6dd3161d7a266e2878791ffb63..7dace38d1bb197db9ac99d7c7626e36420094ee7 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -36,12 +36,12 @@ using namespace std;
 namespace lyx {
 
 InsetMathRef::InsetMathRef()
-       : CommandInset(from_ascii("ref"))
+       : CommandInset(from_ascii("ref"), false)
 {}
 
 
 InsetMathRef::InsetMathRef(docstring const & data)
-       : CommandInset(data)
+       : CommandInset(data, false)
 {}
 
 
@@ -114,7 +114,7 @@ bool InsetMathRef::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_MOUSE_RELEASE:
        case LFUN_MOUSE_PRESS:
        case LFUN_MOUSE_MOTION:
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
        default:
                return CommandInset::getStatus(cur, cmd, status);
@@ -147,6 +147,8 @@ void InsetMathRef::validate(LaTeXFeatures & features) const
                features.require("varioref");
        else if (commandname() == "prettyref")
                features.require("prettyref");
+       else if (commandname() == "eqref")
+               features.require("amsmath");
 }
 
 
@@ -182,7 +184,7 @@ string const InsetMathRef::createDialogStr(string const & name) const
 
 
 InsetMathRef::ref_type_info InsetMathRef::types[] = {
-       { from_ascii("ref"),       from_ascii(N_("Standard[[mathref]]")),              from_ascii(N_("Ref: "))},
+       { from_ascii("ref"),       from_ascii(N_("Standard[[mathref]]")),   from_ascii(N_("Ref: "))},
        { from_ascii("eqref"),     from_ascii(N_("Equation")),              from_ascii(N_("EqRef: "))},
        { from_ascii("pageref"),   from_ascii(N_("Page Number")),           from_ascii(N_("Page: "))},
        { from_ascii("vpageref"),  from_ascii(N_("Textual Page Number")),   from_ascii(N_("TextPage: "))},