diff --git a/designer-realize/src/main/java/com/fr/grid/GridRowUI.java b/designer-realize/src/main/java/com/fr/grid/GridRowUI.java index 44f1fe8749..a0245a3d86 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridRowUI.java +++ b/designer-realize/src/main/java/com/fr/grid/GridRowUI.java @@ -7,7 +7,7 @@ import java.awt.geom.Rectangle2D; import javax.swing.JComponent; import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; - +import com.fr.stable.AssistUtils; import com.fr.base.BaseUtils; import com.fr.base.DynamicUnitList; import com.fr.base.GraphHelper; @@ -106,7 +106,7 @@ public class GridRowUI extends ComponentUI { tmpHeight1 += tmpIncreaseHeight; tmpIncreaseHeight = rowHeightList.get(i).toPixD(resolution); // check these row wich height is zero. - tmpHeight2 = tmpIncreaseHeight == 0 ? tmpHeight1 + 1 : tmpHeight1 + tmpIncreaseHeight; + tmpHeight2 = AssistUtils.equals(tmpIncreaseHeight,0d) ? tmpHeight1 + 1 : tmpHeight1 + tmpIncreaseHeight; // check selection bound. Selection sel = reportPane.getSelection(); int[] selectedRows = sel.getSelectedRows(); diff --git a/designer-realize/src/main/java/com/fr/grid/GridUI.java b/designer-realize/src/main/java/com/fr/grid/GridUI.java index c7ea413687..0ccff309f6 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridUI.java +++ b/designer-realize/src/main/java/com/fr/grid/GridUI.java @@ -47,6 +47,7 @@ import com.fr.stable.ColumnRow; import com.fr.stable.Constants; import com.fr.stable.script.CalculatorUtils; import com.fr.stable.unit.FU; +import com.fr.stable.AssistUtils; import com.fr.third.antlr.ANTLRException; import javax.swing.JComponent; @@ -617,10 +618,10 @@ public class GridUI extends ComponentUI { tmpLine2D = (Line2D) paginateLineList.get(j);// 直接强制转换,因为List中肯定都是Line2D型的 for (int k = j + 1; k < paginateLineList.size(); k++) { tmpLine2D2 = (Line2D) paginateLineList.get(k); - if (tmpLine2D2.getX1() == tmpLine2D.getX1() - && tmpLine2D2.getX2() == tmpLine2D.getX2() - && tmpLine2D2.getY1() == tmpLine2D.getY1() - && tmpLine2D2.getY2() == tmpLine2D.getY2()) { + if (AssistUtils.equals(tmpLine2D2.getX1() ,tmpLine2D.getX1()) + && AssistUtils.equals(tmpLine2D2.getX2() , tmpLine2D.getX2()) + && AssistUtils.equals(tmpLine2D2.getY1() , tmpLine2D.getY1()) + && AssistUtils.equals(tmpLine2D2.getY2() , tmpLine2D.getY2())) { paginateLineList.remove(k); } }