Editor Fixes:

- Updated Undo to use setBinValue().  This will allow for redraw when selecting undo or undo all.
 - Added check for no compares or empty list before refreshing table compares.
This commit is contained in:
Scotthew 2013-06-29 21:45:41 -07:00
parent 4a68f17802
commit 5f4d659e9c
2 changed files with 10 additions and 8 deletions

View File

@ -555,17 +555,15 @@ public class DataCell extends JLabel implements MouseListener, Serializable {
} }
public void undo() { public void undo() {
if(binValue != originalValue) { this.setBinValue(originalValue);
binValue = originalValue;
drawCell();
}
} }
public void setRevertPoint() { public void setRevertPoint() {
if(originalValue != binValue) { this.setOriginalValue(binValue);
originalValue = binValue;
drawCell();
} }
public void setOriginalValue(double originalValue) {
this.originalValue = originalValue;
} }
public void setCompareValue(DataCell compareCell) { public void setCompareValue(DataCell compareCell) {

View File

@ -1217,6 +1217,10 @@ public abstract class Table extends JPanel implements Serializable {
} }
public void refreshCompares() { public void refreshCompares() {
if(null == getComparedToTables() || getComparedToTables().size() < 1) {
return;
}
Window ancestorWindow = SwingUtilities.getWindowAncestor(this); Window ancestorWindow = SwingUtilities.getWindowAncestor(this);
if(null != ancestorWindow) { if(null != ancestorWindow) {