From: amwaterhouse Date: Tue, 14 Jun 2005 10:41:52 +0000 (+0000) Subject: No spaces allowed in sequence name X-Git-Tag: Release_2_0~54 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8bdf67ee17d46e73317ff69f5ac9765e0ec4a48b;p=jalview.git No spaces allowed in sequence name --- diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index d563e09..6a36fb3 100755 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -96,6 +96,9 @@ public class PopupMenu e.printStackTrace(); } + if(seq.getPDBId()==null) + pdbMenuItem.setVisible(false); + SequenceGroup sg = ap.av.getSelectionGroup(); if (sg != null) @@ -624,8 +627,12 @@ public class PopupMenu if (s != null) { - sequence.setName(s); - ap.repaint(); + if(s.indexOf(" ")>-1) + JOptionPane.showMessageDialog(ap, "Spaces have been converted to \"_\"", + "No spaces allowed in Sequence Name", JOptionPane.WARNING_MESSAGE); + s = s.replace(' ', '_'); + sequence.setName(s); + ap.repaint(); } }