Browse Source

REPORT-104017 海外版本地图组件的GIS图层优化-fvs下切换gis图层配置时自动会由mapbox变为黑色

new-design
obo 1 year ago
parent
commit
c65877b26f
  1. 14
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java

14
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java

@ -358,10 +358,22 @@ public class GisLayerPane extends JPanel implements UIObserver {
* @param layer 图层
*/
private void adaptEditingTemplateTheme(GisLayer layer) {
if (Locale.CHINA.equals(GeneralContext.getLocale())) {
return;
}
JTemplate<?, ?> currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
String defaultTabOperator = "DefaultTabOperator"; //用于判断是否为fvs,fvs没有主题,但会返回深色主题导致mapbox切换为black
if(JTemplate.isValid(currentEditingTemplate)) {
boolean dark = currentEditingTemplate.getTemplateTheme().isDark();
String name = dark ? Toolkit.i18nText("Fine-Design_Chart_Layer_Black") : Toolkit.i18nText("Fine-Design_Chart_Layer_MapBox");
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;
}
layer.setLayerName(name);
}
}

Loading…
Cancel
Save