]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSpace.cpp
de.po
[lyx.git] / src / mathed / InsetMathSpace.cpp
index 4f88ecd04dd4c260561c5aaab59557a7a28cca7e..db096092b8e0d2b8767b0f960827bee9417b44ef 100644 (file)
@@ -75,7 +75,7 @@ SpaceInfo space_info[] = {
 int const nSpace = sizeof(space_info)/sizeof(SpaceInfo);
 int const defaultSpace = 4;
 
-} // anon namespace
+} // namespace
 
 InsetMathSpace::InsetMathSpace()
        : space_(defaultSpace)
@@ -125,7 +125,7 @@ void InsetMathSpace::metrics(MetricsInfo & mi, Dimension & dim) const
        dim.asc = 4;
        dim.des = 0;
        if (space_info[space_].custom)
-               dim.wid = abs(length_.inPixels(mi.base));
+               dim.wid = abs(mi.base.inPixels(length_));
        else
                dim.wid = space_info[space_].width;
 }
@@ -320,9 +320,11 @@ void InsetMathSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "mathspace") {
                        MathData ar;
+                       Buffer * buf = buffer_;
                        if (createInsetMath_fromDialogStr(cmd.argument(), ar)) {
                                cur.recordUndo();
                                *this = *ar[0].nucleus()->asSpaceInset();
+                               buffer_ = buf;
                                break;
                        }
                }