Fixed bug with undo button

This commit is contained in:
BorysLevytskyi
2023-05-11 16:10:41 +02:00
parent 45fb00787e
commit 5cde8083b1

View File

@@ -175,6 +175,7 @@ class ExpressionElementTableRow extends React.Component<ExpressionElementRowProp
const maxBitSize = op.value.maxBitSize;
const space = (totalLength - index - maxBitSize);
if(this.originalValue == null)
this.originalValue = op.value;
if(totalLength > op.value.maxBitSize && space > 0) {
@@ -191,6 +192,7 @@ class ExpressionElementTableRow extends React.Component<ExpressionElementRowProp
onChangeSign () {
var op = this.props.expressionItem.getUnderlyingOperand();
if(this.originalValue == null)
this.originalValue = op.value;
op.setValue(op.value.signed ? op.value.toUnsigned() : op.value.toSigned());
this.forceUpdate();