File tree Expand file tree Collapse file tree
src/main/java/com/sjhy/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,8 +36,9 @@ public void init(List<T> data) {
3636 if (CollectionUtil .isEmpty (data )) {
3737 return ;
3838 }
39- this . data = data ;
39+ // 先移除后赋值,修复复制分组后无数据展示问题
4040 removeAllRow ();
41+ this .data = data ;
4142 data .forEach (item -> super .addRow (toObj (item )));
4243 }
4344
@@ -49,7 +50,8 @@ private void removeAllRow() {
4950 int rowCount = getRowCount ();
5051 if (rowCount > 0 ) {
5152 for (int i = 0 ; i < rowCount ; i ++) {
52- removeRow (0 );
53+ // 只移除行数据,不移除储存数据,修复切换分组数据自动清空BUG
54+ super .removeRow (0 );
5355 }
5456 }
5557 }
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public class TypeMapperSetting implements Configurable {
2727 /**
2828 * 类型映射分组切换下拉框
2929 */
30- private JComboBox typeMapperComboBox ;
30+ private JComboBox < String > typeMapperComboBox ;
3131 /**
3232 * 分组复制按钮
3333 */
@@ -166,7 +166,6 @@ private void refresh() {
166166 init = false ;
167167 //初始化下拉框
168168 this .typeMapperComboBox .removeAllItems ();
169- //noinspection unchecked
170169 typeMapperGroupMap .keySet ().forEach (this .typeMapperComboBox ::addItem );
171170 this .typeMapperComboBox .setSelectedItem (this .currGroupName );
172171 this .typeMapperModel .init (this .typeMapperGroupMap .get (currGroupName ).getElementList ());
You can’t perform that action at this time.
0 commit comments