X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FRedundancyPanel.java;h=18a1edda4af9f22456e5c08b5dae7ad826407843;hb=c19d2a91ca05e052e3408bf5852d88eb5d0608f1;hp=c8a0ec7752a954e2afaeeb67e653769502f33835;hpb=cca50cb3aee94f3ed1a5e504d45b8d8b665f8c5b;p=jalview.git diff --git a/src/jalview/gui/RedundancyPanel.java b/src/jalview/gui/RedundancyPanel.java index c8a0ec7..18a1edd 100755 --- a/src/jalview/gui/RedundancyPanel.java +++ b/src/jalview/gui/RedundancyPanel.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -171,7 +171,8 @@ public class RedundancyPanel extends GSliderPanel implements Runnable progress.setVisible(false); progress = null; - label.setText(MessageManager.getString("label.enter_redundancy_thereshold")); + label.setText(MessageManager + .getString("label.enter_redundancy_thereshold")); slider.setVisible(true); applyButton.setEnabled(true); valueField.setVisible(true); @@ -240,7 +241,8 @@ public class RedundancyPanel extends GSliderPanel implements Runnable } } - EditCommand cut = new EditCommand(MessageManager.getString("action.remove_redundancy"), + EditCommand cut = new EditCommand( + MessageManager.getString("action.remove_redundancy"), Action.CUT, deleted, 0, width, ap.av.getAlignment()); for (int i = 0; i < del.size(); i++) @@ -257,7 +259,8 @@ public class RedundancyPanel extends GSliderPanel implements Runnable ap.alignFrame.addHistoryItem(cut); PaintRefresher.Refresh(this, ap.av.getSequenceSetId(), true, true); - ap.av.firePropertyChange("alignment", null, ap.av.getAlignment().getSequences()); + ap.av.firePropertyChange("alignment", null, ap.av.getAlignment() + .getSequences()); } } @@ -270,17 +273,19 @@ public class RedundancyPanel extends GSliderPanel implements Runnable */ public void undoButton_actionPerformed(ActionEvent e) { - if(historyList == null || historyList.isEmpty()){ - undoButton.setEnabled(false); - return; + if (historyList == null || historyList.isEmpty()) + { + undoButton.setEnabled(false); + return; } - + CommandI command = historyList.pop(); - if (ap.av.historyList.contains(command)) + if (ap.av.getHistoryList().contains(command)) { command.undoCommand(af.getViewAlignments()); - ap.av.historyList.remove(command); - ap.av.firePropertyChange("alignment", null, ap.av.getAlignment().getSequences()); + ap.av.getHistoryList().remove(command); + ap.av.firePropertyChange("alignment", null, ap.av.getAlignment() + .getSequences()); af.updateEditMenuBar(); }