Browse Source

REPORT-101773 【版本管理三期】版本详情页面选择版本删除,删完一个操作框的按钮就点不动了

new-design
Destiny.Lin 1 year ago
parent
commit
a007b71ca7
  1. 4
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java
  2. 6
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java
  3. 7
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java

4
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java

@ -216,7 +216,7 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
JOptionPane.QUESTION_MESSAGE);
if (selVal == JOptionPane.YES_OPTION) {
tableEntities = model.getList().stream().filter(tableEntity -> !tableEntity.isSelect()).collect(Collectors.toList());
model.setList(tableEntities);
model.setList(new ArrayList<>(tableEntities));
model.fireTableDataChanged();
listener.doAfterChooseYes(selectList);
fireVcsListener(model.getList());
@ -365,7 +365,7 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
* @param entities
*/
public void updateTableList(List<VcsTableEntity> entities) {
tableEntities = entities;
tableEntities = new ArrayList<>(entities);
}
/**

6
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java

@ -105,7 +105,8 @@ public class VcsCenterPane extends VcsNewPane {
@Override
public void mouseClicked(MouseEvent e) {
JTable table = tableContentPane.getEditTable();
Object o = table.getValueAt(table.getEditingRow(), table.getEditingColumn());
int row = table.getEditingRow();
Object o = table.getValueAt(row, table.getEditingColumn());
if (o instanceof VcsTableEntity) {
VcsEntity entity = ((VcsTableEntity) o).getEntity();
String fileName = entity.getFilename();
@ -118,7 +119,8 @@ public class VcsCenterPane extends VcsNewPane {
if (selVal == JOptionPane.YES_OPTION) {
VcsOperatorWorker.createDeleteWorker().doDelete(entity);
removeTarget((VcsTableEntity) o);
model.getList().remove(o);
model.fireTableRowsDeleted(row, row);
model.removeRow(row);
model.fireTableDataChanged();
}
}

7
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java

@ -202,8 +202,8 @@ public class VcsNewPane extends RecyclePane {
@Override
public void mouseClicked(MouseEvent e) {
JTable table = tableContentPane.getEditTable();
int row = table.getEditingColumn();
Object o = table.getValueAt(table.getEditingRow(), row);
int row = table.getEditingRow();
Object o = table.getValueAt(row, table.getEditingColumn());
if (o instanceof VcsTableEntity) {
VcsEntity entity = ((VcsTableEntity) o).getEntity();
int selVal = FineJOptionPane.showConfirmDialog(
@ -213,7 +213,8 @@ public class VcsNewPane extends RecyclePane {
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (selVal == JOptionPane.YES_OPTION) {
model.getList().remove(o);
model.fireTableRowsDeleted(row, row);
model.removeRow(row);
model.fireTableDataChanged();
VcsOperatorWorker.createDeleteWorker().deleteTargetVersion(entity);
fireVcsListener(model.getList());

Loading…
Cancel
Save