Set these items on EDT

This commit is contained in:
Karl Mortensen 2015-12-23 13:49:07 -05:00
parent ec93ebf581
commit b83cd6d9e2

View File

@ -472,7 +472,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}); });
throw new CaseActionException( throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex);
} }
@ -1590,12 +1590,10 @@ public class Case implements SleuthkitCase.ErrorObserver {
if (RuntimeProperties.coreComponentsAreActive()) { if (RuntimeProperties.coreComponentsAreActive()) {
// enable these menus // enable these menus
SwingUtilities.invokeLater(() -> {
CallableSystemAction.get(AddImageAction.class).setEnabled(true); CallableSystemAction.get(AddImageAction.class).setEnabled(true);
CallableSystemAction.get(CaseCloseAction.class).setEnabled(true); CallableSystemAction.get(CaseCloseAction.class).setEnabled(true);
CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true); CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true);
CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); // Delete Case menu CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); // Delete Case menu
});
if (toChangeTo.hasData()) { if (toChangeTo.hasData()) {
// open all top components // open all top components