canvas.doAction(new ModelAddAction(canvas.getModel(), cur));
}
} else {
String oldText = cur.getText();
if (newText.equals("")) {
canvas.doAction(new ModelRemoveAction(canvas.getModel(), cur));
} else if (!oldText.equals(newText)) {
canvas.doAction(new ModelEditTextAction(canvas.getModel(), cur,
newText));
}
}