don't call Case.hasData() in OpenTimelineAction so we don't block the edt.

I also softened the mesage that pops up if the timeline is opened with no data sources added.
This commit is contained in:
jmillman 2015-02-17 17:09:54 -05:00
parent af179b33ea
commit e8c6ec7f44
2 changed files with 6 additions and 4 deletions

View File

@ -41,5 +41,5 @@ Timeline.ProgressWindow.cancel.confdlg.msg=Do you want to cancel time line creat
Timeline.ProgressWindow.cancel.confdlg.detail=Cancel timeline creation?
Timeline.progressWindow.name=Timeline
Timeline.progressWindow.title=Generating Timeline data
OpenTimeLineAction.msgdlg.text=Error creating timeline, there are no data sources.
OpenTimeLineAction.msgdlg.text=Could not create timeline, there are no data sources.
TimeLineTopComponent.timeZonePanel.text=Display Times In\:

View File

@ -54,7 +54,9 @@ public class OpenTimelineAction extends CallableSystemAction {
@Override
public boolean isEnabled() {
return Case.isCaseOpen() && fxInited && Case.getCurrentCase().hasData();
/** we disabled the check to hasData() because if it is executed while a
* data source is being added, it blocks the edt */
return Case.isCaseOpen() && fxInited;// && Case.getCurrentCase().hasData();
}
@Override
@ -68,8 +70,8 @@ public class OpenTimelineAction extends CallableSystemAction {
if (currentCase.hasData() == false) {
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
NbBundle.getMessage(this.getClass(), "OpenTimeLineAction.msgdlg.text"));
LOGGER.log(Level.INFO, "Error creating timeline, there are no data sources.");// NON-NLS
NbBundle.getMessage(this.getClass(), "OpenTimeLineAction.msgdlg.text"));
LOGGER.log(Level.INFO, "Could not create timeline, there are no data sources.");// NON-NLS
return;
}
synchronized (OpenTimelineAction.class) {