Whenever editing the file import, we deselect all items in the list and disable the edit and remove button to prevent errors. #125

This commit is contained in:
Rob Greene 2023-10-24 19:11:46 -05:00
parent 520076abb6
commit e68741cffe
1 changed files with 7 additions and 1 deletions

View File

@ -110,7 +110,7 @@ public class ImportSelectFilesWizardPane extends WizardPane {
editSelection();
}
});
TableColumn column = new TableColumn(fileTable, SWT.LEFT);
column.setText(textBundle.get("SourceColumnHeader")); //$NON-NLS-1$
column.setWidth(130);
@ -336,6 +336,9 @@ public class ImportSelectFilesWizardPane extends WizardPane {
getAddressText().dispose();
getRawCheckBox().dispose();
dialog.close();
getRemoveButton().setEnabled(false);
getEditButton().setEnabled(false);
getFileTable().deselectAll();
}
});
button = new Button(composite, SWT.PUSH);
@ -343,6 +346,9 @@ public class ImportSelectFilesWizardPane extends WizardPane {
dialog.setDefaultButton(button);
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
getRemoveButton().setEnabled(false);
getEditButton().setEnabled(false);
getFileTable().deselectAll();
try {
// Make an attempt at validating before accepting the change
ImportSpecification temp = new ImportSpecification(spec);