mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-23 21:22:48 +01:00
Fixed bug with undo button
This commit is contained in:
@@ -175,7 +175,8 @@ class ExpressionElementTableRow extends React.Component<ExpressionElementRowProp
|
|||||||
const maxBitSize = op.value.maxBitSize;
|
const maxBitSize = op.value.maxBitSize;
|
||||||
const space = (totalLength - index - maxBitSize);
|
const space = (totalLength - index - maxBitSize);
|
||||||
|
|
||||||
this.originalValue = op.value;
|
if(this.originalValue == null)
|
||||||
|
this.originalValue = op.value;
|
||||||
|
|
||||||
if(totalLength > op.value.maxBitSize && space > 0) {
|
if(totalLength > op.value.maxBitSize && space > 0) {
|
||||||
op.setValue(calc.addSpace(op.value, space));
|
op.setValue(calc.addSpace(op.value, space));
|
||||||
@@ -191,7 +192,8 @@ class ExpressionElementTableRow extends React.Component<ExpressionElementRowProp
|
|||||||
|
|
||||||
onChangeSign () {
|
onChangeSign () {
|
||||||
var op = this.props.expressionItem.getUnderlyingOperand();
|
var op = this.props.expressionItem.getUnderlyingOperand();
|
||||||
this.originalValue = op.value;
|
if(this.originalValue == null)
|
||||||
|
this.originalValue = op.value;
|
||||||
op.setValue(op.value.signed ? op.value.toUnsigned() : op.value.toSigned());
|
op.setValue(op.value.signed ? op.value.toUnsigned() : op.value.toSigned());
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user