if (!attrs.isInput()) return;
java.awt.Component sourceComp = e.getComponent();
if (sourceComp instanceof Canvas && !state.isCircuitRoot()) {
Canvas canvas = (Canvas) e.getComponent();
CircuitState circState = canvas.getCircuitState();
java.awt.Component frame = SwingUtilities.getRoot(canvas);
int choice = JOptionPane.showConfirmDialog(frame,
Strings.get("pinFrozenQuestion"),
Strings.get("pinFrozenTitle"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.WARNING_MESSAGE);
if (choice == JOptionPane.OK_OPTION) {
circState = circState.cloneState();
canvas.getProject().setCircuitState(circState);
state = circState.getInstanceState(state.getInstance());
} else {
return;
}
}