canvas.setErrorMessage(getFromLocale("cannotModifyError"), 0, 0);
return;
}
if (factory instanceof SubcircuitFactory) {
SubcircuitFactory circFact = (SubcircuitFactory) factory;
Dependencies depends = canvas.getProject().getDependencies();
if (!depends.canAdd(circ, circFact.getSubcircuit())) {
canvas.setErrorMessage(getFromLocale("circularError"), 0, 0);
return;
}
}