Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed chromatogram chart using incompatible display types #1231

Merged
merged 2 commits into from
Jan 10, 2023

Conversation

Mailaender
Copy link
Contributor

Closes #1230

@eselmeister
Copy link
Contributor

@Mailaender Good idea, but this PR leads to other problems, when displaying the chromatograms. It gets obvious, when having a look at the HPLC-DAD chromatogram. The scan selection changes the editor as SWC is selected.

HPLC-DAD (initially)
Screenshot from 2023-01-10 06-07-48

HPLC-DAD (after scan selection)
Screenshot from 2023-01-10 06-07-59

The chromatogram editor usually always shows TIC, hence please try and test it with the following changes in ExtendedChromatogramUI. Instead of

private void setDataType(IChromatogramSelection<?, ?> chromatogramSelection) {

	if(chromatogramSelection instanceof IChromatogramSelectionWSD) {
		displayType = DisplayType.SWC;
	} else {
		displayType = DisplayType.TIC;
	}
}

simply try

private void setDataType(IChromatogramSelection<?, ?> chromatogramSelection) {

	displayType = DisplayType.TIC;
}

and in ChromatogramChartSupport, remove the additional validations:

if(dataType.equals(DisplayType.SWC) && !(chromatogramSelection instanceof IChromatogramSelectionWSD)) {
	throw new InvalidParameterException(dataType + "not allowed with " + chromatogramSelection);
}
if((dataType.equals(DisplayType.SIC) || dataType.equals(DisplayType.XIC)) && !(chromatogramSelection instanceof IChromatogramSelectionMSD)) {
	throw new InvalidParameterException(dataType + "not allowed with " + chromatogramSelection);
}

With the changes, the chromatogram and handling looks like this:

Screenshot from 2023-01-10 06-18-15

Screenshot from 2023-01-10 06-18-26

Screenshot from 2023-01-10 06-18-37

@eselmeister eselmeister merged commit 0f6aa3d into eclipse:develop Jan 10, 2023
@Mailaender Mailaender deleted the reference-chromatogram-type branch January 10, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ChromatogramSelectionMSD cannot be cast to IChromatogramSelectionWSD
2 participants