|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|