]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/CommandInset.cpp
Remove hardcoded values
[lyx.git] / src / mathed / CommandInset.cpp
index e09604e241c9f2973f1cde97d07172c05a9d343d..0c9e585e1a7a976893db08d832889aba627b0c8b 100644 (file)
@@ -43,8 +43,6 @@ void CommandInset::metrics(MetricsInfo & mi, Dimension & dim) const
                button_.update(screenLabel(), true);
        }
        button_.metrics(mi, dim);
-       // Cache the inset dimension. 
-       setDimCache(mi, dim);
 }
 
 
@@ -58,7 +56,6 @@ Inset * CommandInset::editXY(Cursor & cur, int /*x*/, int /*y*/)
 void CommandInset::draw(PainterInfo & pi, int x, int y) const
 {
        button_.draw(pi, x, y);
-       setPosCache(pi, x, y);
 }
 
 
@@ -67,7 +64,7 @@ void CommandInset::write(WriteStream & os) const
        ModeSpecifier specifier(os, currentMode(), lockedMode(), asciiOnly());
        MathEnsurer ensurer(os, needs_math_mode_);
        os << '\\' << name_;
-       if (cell(1).size())
+       if (!cell(1).empty())
                os << '[' << cell(1) << ']';
        os << '{' << cell(0) << '}';
 }