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,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();
|
||||
|
||||
Reference in New Issue
Block a user