X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=e574450b23297e947ebe9ee016b3ced2b20651f8;hb=d587f1aa61946dc14f6f089cf1dc2a3116cfb773;hp=4afaf92e70e3e0680f82e745c4717b9a9fc42e1d;hpb=b21920d2355ae42bdada6dfc0c42614aa0539137;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 4afaf92..e574450 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -618,7 +618,10 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener public void save_actionPerformed(ActionEvent e) { - if(fileName==null || currentFileFormat==null) + if(fileName==null + || currentFileFormat==null + || fileName.startsWith("http") + ) saveAs_actionPerformed(null); else saveAlignment(fileName, currentFileFormat); @@ -990,6 +993,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener */ protected void redoMenuItem_actionPerformed(ActionEvent e) { + if(viewport.redoList.size()<1) + return; + CommandI command = (CommandI) viewport.redoList.pop(); viewport.historyList.push(command); command.doCommand(); @@ -1010,12 +1016,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener //For sequence removal and addition, we need to fire //the property change event FROM the viewport where the //original alignment was altered + AlignmentI al=null; if (command instanceof EditCommand) { EditCommand editCommand = (EditCommand) command; - AlignmentI al = editCommand.getAlignment(); + al = editCommand.getAlignment(); Vector comps = (Vector) PaintRefresher.components .get(viewport.getSequenceSetId()); + for (int i = 0; i < comps.size(); i++) { if (comps.elementAt(i) instanceof AlignmentPanel) @@ -1027,17 +1035,18 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener } } } - if (originalSource == null) - { - //The original view is closed, we must validate - //the current view against the closed view first + } + + if (originalSource == null) + { + //The original view is closed, we must validate + //the current view against the closed view first + if (al != null) PaintRefresher.validateSequences(al, viewport.alignment); - originalSource = viewport; - } + originalSource = viewport; } - return originalSource; } @@ -1471,7 +1480,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener protected void deleteGroups_actionPerformed(ActionEvent e) { viewport.alignment.deleteAllGroups(); - viewport.sequenceColours.clear(); + viewport.sequenceColours = null; viewport.setSelectionGroup(null); PaintRefresher.Refresh(this, viewport.getSequenceSetId()); alignPanel.repaint(); @@ -2651,9 +2660,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener tp = new TreePanel(alignPanel, type, pwType); } - title = title + " from " + this.title; + title += " from "; + if(viewport.viewName!=null) - title+= " ("+viewport.viewName+")"; + title+= viewport.viewName+" of "; + + title += this.title; Desktop.addInternalFrame(tp, title, 600, 500); }