From c77189c329fc5c94e9300cede69d4f1fb8176af6 Mon Sep 17 00:00:00 2001 From: Bryant Date: Sun, 20 Oct 2019 15:04:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20sonar?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/syntax/print/RPrintUtilities.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/syntax/print/RPrintUtilities.java b/designer-base/src/main/java/com/fr/design/gui/syntax/print/RPrintUtilities.java index 500d1312a6..749bf45408 100644 --- a/designer-base/src/main/java/com/fr/design/gui/syntax/print/RPrintUtilities.java +++ b/designer-base/src/main/java/com/fr/design/gui/syntax/print/RPrintUtilities.java @@ -522,9 +522,8 @@ public abstract class RPrintUtilities { return x; int tabSizeInPixels = tabSizeInSpaces * fm.charWidth(' '); int ntabs = (((int) x) - xOffset) / tabSizeInPixels; - int reFloat = xOffset + ((ntabs + 1) * tabSizeInPixels); - float ans = reFloat; - return ans; + double reFloat = (double) xOffset + (double) ((ntabs + 1) * tabSizeInPixels); + return (float) reFloat; } }