From: gmungoc Date: Thu, 17 Jan 2019 15:29:29 +0000 (+0000) Subject: Merge branch 'develop' into Jalview-BH/JAL-3026-JAL-3063-JAXB X-Git-Tag: Release_2_11_4_0~45^2~18^2~315 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4c132b37c867a60959dae032addd78892d996345;p=jalview.git Merge branch 'develop' into Jalview-BH/JAL-3026-JAL-3063-JAXB Conflicts: .gitignore resources/lang/Messages.properties resources/lang/Messages_es.properties src/jalview/commands/EditCommand.java src/jalview/gui/FeatureSettings.java src/jalview/gui/ScalePanel.java --- 4c132b37c867a60959dae032addd78892d996345 diff --cc resources/lang/Messages.properties index fde0b1c,c248a10..9764721 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@@ -1357,10 -1361,5 +1355,12 @@@ label.most_bound_molecules = Most Boun label.most_polymer_residues = Most Polymer Residues label.cached_structures = Cached Structures label.free_text_search = Free Text Search +label.annotation_name = Annotation Name +label.annotation_description = Annotation Description +label.edit_annotation_name_description = Edit Annotation Name/Description +label.alignment = alignment +label.pca = PCA +label.create_image_of = Create {0} image of {1} +label.click_to_edit = Click to edit, right-click for menu + label.configuration = Configuration + label.configure_feature_tooltip = Click to configure variable colour or filters diff --cc resources/lang/Messages_es.properties index 8b7fd0d,232c7b4..1cca7a6 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@@ -1358,10 -1362,5 +1356,12 @@@ label.most_bound_molecules = Más Molécu label.most_polymer_residues = Más Residuos de Polímeros label.cached_structures = Estructuras en Caché label.free_text_search = Búsqueda de texto libre +label.annotation_name = Nombre de la anotación +label.annotation_description = Descripción de la anotación +label.edit_annotation_name_description = Editar el nombre/descripción de la anotación +label.alignment = alineamiento +label.pca = ACP +label.create_image_of = Crear imagen {0} de {1} +label.click_to_edit = Haga clic para editar, clic en el botón derecho para ver el menú + label.configuration = Configuración + label.configure_feature_tooltip = Haga clic para configurar el color o los filtros diff --cc src/jalview/commands/EditCommand.java index b813dcf,1a227c5..385a33e --- a/src/jalview/commands/EditCommand.java +++ b/src/jalview/commands/EditCommand.java @@@ -596,17 -607,19 +607,19 @@@ public class EditCommand implements Com for (int i = 0; i < command.seqs.length; i++) { - newDSNeeded = false; - newDSWasNeeded = command.oldds != null && command.oldds[i] != null; - if (command.seqs[i].getLength() < 1) + boolean newDSNeeded = false; + boolean newDSWasNeeded = command.oldds != null + && command.oldds[i] != null; + SequenceI sequence = command.seqs[i]; + if (sequence.getLength() < 1) { - // ie this sequence was deleted, we need to - // readd it to the alignment + /* + * sequence was deleted; re-add it to the alignment + */ if (command.alIndex[i] < command.al.getHeight()) { - List sequences; - synchronized (sequences = command.al.getSequences()) + List sequences = command.al.getSequences(); + synchronized (sequences) { if (!(command.alIndex[i] < 0)) { @@@ -1315,29 -1443,45 +1443,45 @@@ public class Edit { - public SequenceI[] oldds; - private SequenceI[] oldds; ++ SequenceI[] oldds; + + /** + * start and end of sequence prior to edit + */ - private Range[] oldStartEnd; ++ Range[] oldStartEnd; - private boolean fullAlignmentHeight = false; + boolean fullAlignmentHeight = false; - Hashtable deletedAnnotationRows; - private Map deletedAnnotationRows; ++ Map deletedAnnotationRows; + - private Map deletedAnnotations; ++ Map deletedAnnotations; - Hashtable deletedAnnotations; + /* + * features deleted by the cut (re-add on Undo) + * (including the original of any shortened features) + */ - private Map> deletedFeatures; ++ Map> deletedFeatures; - Hashtable> editedFeatures; + /* + * shortened features added by the cut (delete on Undo) + */ - private Map> truncatedFeatures; ++ Map> truncatedFeatures; - private AlignmentI al; + AlignmentI al; - Action command; - final private Action command; ++ final Action command; char[][] string; SequenceI[] seqs; - private int[] alIndex; + int[] alIndex; - int position, number; - private int position; ++ int position; + - private int number; ++ int number; - private char gapChar; + char gapChar; public Edit(Action cmd, SequenceI[] sqs, int pos, int count, char gap) diff --cc src/jalview/gui/ScalePanel.java index 5da14b3,6abee08..f617d0f --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@@ -276,11 -275,12 +276,14 @@@ public class ScalePanel extends JPane public void mouseReleased(MouseEvent evt) { mouseDragging = false; + ap.getSeqPanel().stopScrolling(); + // todo res calculation should be a method on AlignViewport - int res = (evt.getX() / av.getCharWidth()) + int xCords = Math.max(0, evt.getX()); // prevent negative X coordinates + + int res = (xCords / av.getCharWidth()) + av.getRanges().getStartRes(); + if (av.hasHiddenColumns()) { res = av.getAlignment().getHiddenColumns()