Fixed a bug in the table reorder algorithm.

This commit is contained in:
hneemann 2019-11-19 07:55:23 +01:00
parent 65c0cfd700
commit e2c95175b6
2 changed files with 3 additions and 2 deletions

View File

@ -171,6 +171,7 @@ public class TruthTable implements Copyable<TruthTable> {
variables.clear();
variables.addAll(vars);
results.clear();
bitSetter = null;
}
/**

View File

@ -212,11 +212,11 @@ public class TableDialog extends JDialog {
undoManager.apply(tt -> {
try {
new ReorderInputs(tt, varNames).reorder();
tableChanged();
} catch (ExpressionException ex) {
throw new ModifyException("failed to reorder", ex);
}
});
tableChanged();
} catch (ModifyException e1) {
new ErrorMessage().addCause(e1).show(TableDialog.this);
}
@ -248,11 +248,11 @@ public class TableDialog extends JDialog {
undoManager.apply(tt -> {
try {
new ReorderOutputs(tt, resultNames).reorder();
tableChanged();
} catch (ExpressionException ex) {
throw new ModifyException("failed to reorder", ex);
}
});
tableChanged();
} catch (ModifyException e1) {
new ErrorMessage().addCause(e1).show(TableDialog.this);
}