"Internal error prevents replacing circuit.",
"Internal Error", JOptionPane.ERROR_MESSAGE);
return;
}
CircuitMutation xn = CircuitBuilder.build(circuit, model, twoInputs,
useNands);
dest.doAction(xn.toAction(getFromLocale("replaceCircuitAction")));
} else {
// add the circuit
Circuit circuit = new Circuit(name);
CircuitMutation xn = CircuitBuilder.build(circuit, model, twoInputs,
useNands);
xn.execute();
dest.doAction(LogisimFileActions.addCircuit(circuit));
dest.setCurrentCircuit(circuit);
}
}