From e68741cffe0d54918cebf298728ffd132717b445 Mon Sep 17 00:00:00 2001 From: Rob Greene Date: Tue, 24 Oct 2023 19:11:46 -0500 Subject: [PATCH] Whenever editing the file import, we deselect all items in the list and disable the edit and remove button to prevent errors. #125 --- .../wizard/importfile/ImportSelectFilesWizardPane.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ac-swt-common/src/main/java/com/webcodepro/applecommander/ui/swt/wizard/importfile/ImportSelectFilesWizardPane.java b/lib/ac-swt-common/src/main/java/com/webcodepro/applecommander/ui/swt/wizard/importfile/ImportSelectFilesWizardPane.java index 59b27ad..5191038 100644 --- a/lib/ac-swt-common/src/main/java/com/webcodepro/applecommander/ui/swt/wizard/importfile/ImportSelectFilesWizardPane.java +++ b/lib/ac-swt-common/src/main/java/com/webcodepro/applecommander/ui/swt/wizard/importfile/ImportSelectFilesWizardPane.java @@ -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);