Skip to content

Commit

Permalink
Fix null mass spectrum not setting type correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Feb 2, 2025
1 parent c5ac552 commit c8cf9fe
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ private void createControl() {
private void createPages(Composite parent) {

if(massSpectra != null && massSpectra.getMassSpectrum(1) != null) {
massSpectrum = massSpectra.getMassSpectrum(1);
createMassSpectrumPage(parent);
} else {
createErrorMessagePage(parent);
Expand Down Expand Up @@ -116,8 +117,8 @@ private void createMassSpectrumChart(Composite composite) {

private boolean isProfile() {

if(massSpectrum instanceof IRegularMassSpectrum regularLibraryMassSpectrum) {
return regularLibraryMassSpectrum.getMassSpectrumType() == MassSpectrumType.PROFILE;
if(massSpectrum instanceof IRegularMassSpectrum regularMassSpectrum) {
return regularMassSpectrum.getMassSpectrumType() == MassSpectrumType.PROFILE;
} else {
return PreferenceSupplier.useProfileMassSpectrumView();
}
Expand Down

0 comments on commit c8cf9fe

Please sign in to comment.