From 3109cda04d14f5ce066f3e5587d359d7f4f915ae Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 25 Aug 2023 13:56:50 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-104017=20=E6=B5=B7=E5=A4=96=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=9B=BE=E7=BB=84=E4=BB=B6=E7=9A=84GIS?= =?UTF-8?q?=E5=9B=BE=E5=B1=82=E4=BC=98=E5=8C=96-fvs=E4=B8=8B=E5=88=87?= =?UTF-8?q?=E6=8D=A2gis=E5=9B=BE=E5=B1=82=E9=85=8D=E7=BD=AE=E6=97=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E4=BC=9A=E7=94=B1mapbox=E5=8F=98=E4=B8=BA?= =?UTF-8?q?=E9=BB=91=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/map/designer/type/GisLayerPane.java | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java index 3a078d4e29..d7bc40e33e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java @@ -62,6 +62,11 @@ public class GisLayerPane extends JPanel implements UIObserver { private String[] layers = MapLayerConfigManager.getCustomLayerItems(); + /** + * fvs的具体类型 + */ + private String FVS_TEMPLATE_CLASS = "class com.fr.plugin.wysiwyg.report.JDuchamp"; + public GisLayerPane() { initComps(); } @@ -250,9 +255,9 @@ public class GisLayerPane extends JPanel implements UIObserver { public void resetGisLayer(VanChartMapPlot mapPlot) { // if (ChartEditContext.supportTheme()) { - GisLayer defaultGisLayer = mapPlot.getDefaultGisLayer(); - mapPlot.setGisLayer(defaultGisLayer); - populate(defaultGisLayer); + GisLayer defaultGisLayer = mapPlot.getDefaultGisLayer(); + mapPlot.setGisLayer(defaultGisLayer); + populate(defaultGisLayer); // } else { // GaoDeGisType gaoDeGisType = mapPlot.getDefaultGisLayerType(); // @@ -291,7 +296,7 @@ public class GisLayerPane extends JPanel implements UIObserver { if (layer.getGisLayerType() == GISLayerType.LAYER_NULL) { standardLayers.setSelectedIndex(standardLayers.getItemCount() - 1); } else { - if(Locale.CHINA.equals(GeneralContext.getLocale())) { + if (Locale.CHINA.equals(GeneralContext.getLocale())) { standardLayers.setSelectedItem(layerName); layer.setGaoDeGisType(GaoDeGisType.parseByLocaleName(layerName)); } else { @@ -358,22 +363,16 @@ public class GisLayerPane extends JPanel implements UIObserver { * @param layer 图层 */ private void adaptEditingTemplateTheme(GisLayer layer) { - if (Locale.CHINA.equals(GeneralContext.getLocale())) { + if (GeneralContext.isSimpleChineseEnv()) { return; } JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); - String defaultTabOperator = "DefaultTabOperator"; //用于判断是否为fvs,fvs没有主题,但会返回深色主题导致mapbox切换为black - - if(JTemplate.isValid(currentEditingTemplate)) { - boolean dark = currentEditingTemplate.getTemplateTheme().isDark(); - String name; - String mapbox = Toolkit.i18nText("Fine-Design_Chart_Layer_MapBox"); - String black = Toolkit.i18nText("Fine-Design_Chart_Layer_Black"); - if(defaultTabOperator.equals(currentEditingTemplate.getTemplateTabOperatorType())) { - name = dark ? black : mapbox; - } else { - name = mapbox; + if (JTemplate.isValid(currentEditingTemplate)) { + if (FVS_TEMPLATE_CLASS.equals(currentEditingTemplate.getClass().toString())) { + return; } + boolean dark = currentEditingTemplate.getTemplateTheme().isDark(); + String name = dark ? Toolkit.i18nText("Fine-Design_Chart_Layer_Black") : Toolkit.i18nText("Fine-Design_Chart_Layer_MapBox"); layer.setLayerName(name); } }