From 968e71fa2914ce20dd8caca18dd7d4651b636af5 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 9 May 2017 10:16:50 +0100 Subject: [PATCH] JAL-1632 correct i18n and NPE --- resources/lang/Messages_es.properties | 2 +- src/jalview/gui/CalculationChooser.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index cab8e7e..28c0eaa 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -177,7 +177,7 @@ label.score_model_pid = % Identidad label.score_model_blosum62 = BLOSUM62 label.score_model_pam250 = PAM 250 label.score_model_smithwatermanscore = Puntuación entre secuencias alineadas por Smith-Waterman con matriz por defecto proteica / nucleotídica -label.score_model_sequencefeaturesimilarity = Medida de distancia por cuenta promedia de características no compartidas at sequence positions +label.score_model_sequencefeaturesimilarity = Medida de distancia por cuenta promedia de características no compartidas en posiciones de secuencia label.score_model_conservation = Conservación de las propiedades físico-químicas label.score_model_enhconservation = Conservación de las propiedades físico-químicas label.status_bar = Barra de estado diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index 6f5510c..8a95594 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -25,6 +25,7 @@ import jalview.analysis.scoremodels.ScoreModels; import jalview.analysis.scoremodels.SimilarityParams; import jalview.api.analysis.ScoreModelI; import jalview.api.analysis.SimilarityParamsI; +import jalview.datamodel.SequenceGroup; import jalview.util.MessageManager; import java.awt.BorderLayout; @@ -269,9 +270,7 @@ public class CalculationChooser extends JPanel title = title + " (" + af.getViewport().viewName + ")"; } - Desktop.addInternalFrame(frame, - title, width, - height, false); + Desktop.addInternalFrame(frame, title, width, height, false); calcChoicePanel.doLayout(); revalidate(); /* @@ -488,7 +487,8 @@ public class CalculationChooser extends JPanel * this check in in case this method gets exposed programmatically in future */ AlignViewport viewport = af.getViewport(); - if (viewport.getSelectionGroup().getSize() < MIN_TREE_SELECTION) + SequenceGroup sg = viewport.getSelectionGroup(); + if (sg != null && sg.getSize() < MIN_TREE_SELECTION) { JvOptionPane .showMessageDialog( -- 1.7.10.2