mirror of https://github.com/rusefi/RomRaider.git
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:
parent
4a68f17802
commit
5f4d659e9c
|
@ -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) {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue