if (mode == Mode.rotate) {
if (c instanceof RotateCommand && affectedNodes.equals(((RotateCommand) c).getTransformedNodes())) {
((RotateCommand) c).handleEvent(currentEN);
} else {
Main.main.undoRedo.add(new RotateCommand(selection, currentEN));
}
} else if (mode == Mode.scale) {
if (c instanceof ScaleCommand && affectedNodes.equals(((ScaleCommand) c).getTransformedNodes())) {
((ScaleCommand) c).handleEvent(currentEN);
} else {