]> git.lyx.org Git - lyx.git/commitdiff
small bugfix
authorAndré Pönitz <poenitz@gmx.net>
Sun, 18 Apr 2004 19:57:58 +0000 (19:57 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Sun, 18 Apr 2004 19:57:58 +0000 (19:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8666 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/command_inset.C
src/mathed/command_inset.h
src/mathed/ref_inset.C

index 1e06d4626811e8109b5988e6b99318042db05147..b38f46115a053813f40fb44887e49f10cc337938 100644 (file)
@@ -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();
 }
index 6842f1071d703cb631c61a10ab1a5fd97e57b32d..ffec6a762545dbc52ba8c4c2cb22575900ddac9a 100644 (file)
@@ -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_;
 };
 
index cfd5f6086538631bde3030f82680bb1e0ae789eb..2706f76bbc70b431b0ae3c4de99cfb8394b6a932 100644 (file)
 #include <config.h>
 
 #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;
                }