From 789a6ebf2ace9cd0b276b9aa297a05970f2af447 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Mon, 17 Feb 2014 02:11:57 +0100 Subject: [PATCH] InsetMathXArrow.cpp; code simplification --- src/mathed/InsetMathXArrow.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mathed/InsetMathXArrow.cpp b/src/mathed/InsetMathXArrow.cpp index 06ef4a5240..7439970fb4 100644 --- a/src/mathed/InsetMathXArrow.cpp +++ b/src/mathed/InsetMathXArrow.cpp @@ -51,13 +51,12 @@ void InsetMathXArrow::metrics(MetricsInfo & mi, Dimension & dim) const void InsetMathXArrow::draw(PainterInfo & pi, int x, int y) const { ScriptChanger dummy(pi.base); - Dimension const dim00 = dimension(*pi.base.bv); - Dimension const & dim01 = cell(0).dimension(*pi.base.bv); + Dimension const dim = dimension(*pi.base.bv); + Dimension const & dim0 = cell(0).dimension(*pi.base.bv); // center the cells with the decoration - cell(0).draw(pi, x + dim00.width()/2 - dim01.width()/2, y - 10); + cell(0).draw(pi, x + dim.width()/2 - dim0.width()/2, y - 10); Dimension const & dim1 = cell(1).dimension(*pi.base.bv); - cell(1).draw(pi, x + dim00.width()/2 - dim1.width()/2, y + dim1.height()); - Dimension const dim = dimension(*pi.base.bv); + cell(1).draw(pi, x + dim.width()/2 - dim1.width()/2, y + dim1.height()); mathed_draw_deco(pi, x + 1, y - 7, dim.wid - 2, 5, name_); drawMarkers(pi, x, y); } -- 2.39.2