Skip to content

Commit

Permalink
Fix template report opening regardless of setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Nov 13, 2024
1 parent af6c388 commit 5d6b695
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ public void handleEvent(Event event) {
if(object instanceof File file) {
if(file.exists()) {
if(IChemClipseEvents.TOPIC_PROCESSING_FILE_CREATED.equals(topic)) {
if(PreferenceSupplier.isOpenReportAfterProcessing()) {
SystemEditor.open(file);
}
SystemEditor.open(file);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public IProcessingInfo<File> generate(File file, boolean append, List<IChromatog
ReportWriter reportWriter = new ReportWriter();
reportWriter.generate(file, append, chromatograms, reportSettings, monitor);
processingInfo.setProcessingResult(file);
UpdateNotifier.update(IChemClipseEvents.TOPIC_PROCESSING_FILE_CREATED, file);
if(PreferenceSupplier.isOpenReportAfterProcessing()) {
UpdateNotifier.update(IChemClipseEvents.TOPIC_PROCESSING_FILE_CREATED, file);
}
} catch(IOException e) {
logger.warn(e);
processingInfo.addErrorMessage(DESCRIPTION, "The report couldn't be created. An error occured.");
Expand All @@ -59,7 +61,6 @@ public IProcessingInfo<File> generate(File file, boolean append, List<IChromatog
logger.warn("The settings are not of type: " + ChromatogramReportSettings.class);
}
}
//
return processingInfo;
}

Expand Down

0 comments on commit 5d6b695

Please sign in to comment.