X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FRedundancyPanel.java;h=0e55cf89f733d8dc081b57a6ad261a9a3e97208a;hb=76139ef711627a3176736af47272ff55be62e720;hp=5adfae98bf14a30531d587ae0e84e99a9d1988a8;hpb=7ab5d6b0ba5fec1ea4a4239e79c476d841622485;p=jalview.git diff --git a/src/jalview/gui/RedundancyPanel.java b/src/jalview/gui/RedundancyPanel.java index 5adfae9..0e55cf8 100755 --- a/src/jalview/gui/RedundancyPanel.java +++ b/src/jalview/gui/RedundancyPanel.java @@ -159,7 +159,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable progress.setVisible(false); progress = null; - label.setText("Enter the redundancy threshold"); + label.setText(MessageManager.getString("label.enter_redundancy_thereshold")); slider.setVisible(true); applyButton.setEnabled(true); valueField.setVisible(true); @@ -228,7 +228,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable } } - EditCommand cut = new EditCommand("Remove Redundancy", + EditCommand cut = new EditCommand(MessageManager.getString("action.remove_redundancy"), EditCommand.CUT, deleted, 0, width, ap.av.getAlignment()); for (int i = 0; i < del.size(); i++) @@ -245,8 +245,7 @@ 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()); } } @@ -259,12 +258,17 @@ public class RedundancyPanel extends GSliderPanel implements Runnable */ public void undoButton_actionPerformed(ActionEvent e) { + if(historyList == null || historyList.isEmpty()){ + undoButton.setEnabled(false); + return; + } + CommandI command = (CommandI) historyList.pop(); - command.undoCommand(af.getViewAlignments()); - if (ap.av.historyList.contains(command)) { + command.undoCommand(af.getViewAlignments()); ap.av.historyList.remove(command); + ap.av.firePropertyChange("alignment", null, ap.av.getAlignment().getSequences()); af.updateEditMenuBar(); }