From f9fbbd68489cd522f2bbb3bc908382e40708d82a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 13 Apr 2021 09:50:23 +0800 Subject: [PATCH] =?UTF-8?q?CHART-18859=20=E6=96=87=E4=BB=B6=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E8=B7=AF=E5=BE=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/series/PlotSeries/MapCustomPane.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapCustomPane.java b/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapCustomPane.java index d3c8cc41ce..8cd0743dab 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapCustomPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapCustomPane.java @@ -23,6 +23,9 @@ import org.apache.batik.swing.svg.SVGFileFilter; import javax.swing.JFileChooser; import javax.swing.JPanel; import javax.swing.SwingConstants; +import java.io.File; +import java.util.ArrayList; +import java.util.List; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.FlowLayout; @@ -30,9 +33,6 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import java.io.File; -import java.util.ArrayList; -import java.util.List; /** * 自定义地图界面. @@ -117,7 +117,11 @@ refreshAreaNameBox(); int returnVal = svgFileChooser.showOpenDialog(DesignerContext.getDesignerFrame()); if (returnVal != JFileChooser.CANCEL_OPTION) { File selectedFile = svgFileChooser.getSelectedFile(); - lastSelectPath = selectedFile.getAbsolutePath(); + try { + lastSelectPath = selectedFile.getCanonicalPath(); + } catch (Exception ex) { + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); + } if (selectedFile != null && selectedFile.isFile()) { imageShowPane.setSvgMap(selectedFile.getPath()); imageShowPane.repaint(); @@ -133,7 +137,7 @@ refreshAreaNameBox(); String colName = Utils.objectToString(areaString.getSelectedItem()); TableDataWrapper tableDataWrappe = tableDataNameBox.getTableDataWrapper(); - + imageShowPane.refreshFromDataList(getColValuesInData(tableDataWrappe, colName)); } }