Browse Source

Pull request #1673: CHART-13958 地图点击gis选择会还原缩放大小

Merge in DESIGN/design from ~BJORN/design:release/10.0 to release/10.0

* commit 'f03d6b65fd86e48af75eedfd8a029dfc72ac1476':
  CHART-13958 地图点击gis选择会还原缩放大小
feature/big-screen
Bjorn 5 years ago
parent
commit
b60ec58953
  1. 19
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java

19
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -42,7 +42,7 @@ import com.fr.van.chart.drillmap.designer.data.comp.MapDataTree;
import com.fr.workspace.WorkContext;
import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.SwingWorker;
@ -51,6 +51,8 @@ import javax.swing.event.PopupMenuListener;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
@ -61,8 +63,6 @@ import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Mitisky on 16/5/11.
@ -280,14 +280,12 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
String selected = Utils.objectToString(gisLayer.getSelectedItem());
ZoomLevel zoomSelected = (ZoomLevel) zoomLevel.getSelectedItem();
gisLayer.removeAllItems();
for (String item : MapLayerConfigManager.getLayerItems()) {
gisLayer.addItem(item);
}
gisLayer.setModel(new DefaultComboBoxModel(MapLayerConfigManager.getLayerItems()));
gisLayer.setSelectedItem(selected);
zoomLevel.setSelectedItem(zoomSelected);
}
});
@ -346,10 +344,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
} else {
levels = ZOOM_LEVELS;
}
zoomLevel.removeAllItems();
for (int i = 0; i < levels.length; i++) {
zoomLevel.addItem(levels[i]);
}
zoomLevel.setModel(new DefaultComboBoxModel(levels));
}

Loading…
Cancel
Save