From 8bdf67ee17d46e73317ff69f5ac9765e0ec4a48b Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 14 Jun 2005 10:41:52 +0000 Subject: [PATCH] No spaces allowed in sequence name --- src/jalview/gui/PopupMenu.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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(); } } -- 1.7.10.2