From: André Pönitz Date: Sun, 18 Apr 2004 19:57:58 +0000 (+0000) Subject: small bugfix X-Git-Tag: 1.6.10~15302 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7be1d7a71742b56ec6540776c05f01c93bcfbb84;p=lyx.git small bugfix git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8666 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/command_inset.C b/src/mathed/command_inset.C index 1e06d46268..b38f46115a 100644 --- a/src/mathed/command_inset.C +++ b/src/mathed/command_inset.C @@ -15,8 +15,8 @@ #include "math_mathmlstream.h" #include "dispatchresult.h" #include "funcrequest.h" -#include "support/std_sstream.h" +#include "support/std_sstream.h" using std::string; using std::auto_ptr; @@ -24,9 +24,7 @@ using std::ostringstream; CommandInset::CommandInset(string const & name) - : MathNestInset(2), - name_(name), - set_label_(false) + : MathNestInset(2), name_(name), set_label_(false) { lock_ = true; } @@ -45,6 +43,7 @@ void CommandInset::metrics(MetricsInfo & mi, Dimension & dim) const button_.update(screenLabel(), true); } button_.metrics(mi, dim); + dim_ = dim; } @@ -66,16 +65,16 @@ void CommandInset::write(WriteStream & os) const string const CommandInset::screenLabel() const { - return name_; + return name_; } string const CommandInset::createDialogStr(string const & name) const { - ostringstream data; - data << name << " LatexCommand "; - WriteStream wsdata(data); - write(wsdata); - wsdata << "\n\\end_inset\n\n"; - return data.str(); + ostringstream os; + os << name << " LatexCommand "; + WriteStream ws(os); + write(ws); + ws << "\n\\end_inset\n\n"; + return os.str(); } diff --git a/src/mathed/command_inset.h b/src/mathed/command_inset.h index 6842f1071d..ffec6a7625 100644 --- a/src/mathed/command_inset.h +++ b/src/mathed/command_inset.h @@ -37,11 +37,14 @@ public: virtual std::string const screenLabel() const; /// generate something that will be understood by the Dialogs. std::string const createDialogStr(std::string const & name) const; - + /// std::string const & commandname() const { return name_; } private: + /// std::string name_; + /// mutable bool set_label_; + /// mutable RenderButton button_; }; diff --git a/src/mathed/ref_inset.C b/src/mathed/ref_inset.C index cfd5f60865..2706f76bbc 100644 --- a/src/mathed/ref_inset.C +++ b/src/mathed/ref_inset.C @@ -11,16 +11,16 @@ #include #include "ref_inset.h" -#include "math_data.h" -#include "math_factory.h" #include "BufferView.h" +#include "LaTeXFeatures.h" #include "cursor.h" #include "debug.h" #include "funcrequest.h" -#include "math_support.h" #include "gettext.h" -#include "LaTeXFeatures.h" +#include "math_data.h" +#include "math_factory.h" +#include "math_support.h" #include "frontends/LyXView.h" #include "frontends/Dialogs.h" @@ -69,7 +69,7 @@ void RefInset::priv_dispatch(LCursor & cur, FuncRequest & cmd) case LFUN_MOUSE_RELEASE: if (cmd.button() == mouse_button::button3) { - lyxerr << "trying to goto ref" << cell(0) << endl; + lyxerr << "trying to goto ref '" << asString(cell(0)) << "'" << endl; cur.bv().dispatch(FuncRequest(LFUN_REF_GOTO, asString(cell(0)))); break; }