use of com.bladecoder.engineeditor.undo.UndoDeleteVerb in project bladecoder-adventure-engine by bladecoder.
the class VerbList method delete.
@Override
protected void delete() {
Verb v = removeSelected();
parent.getVerbs().remove(v.getHashKey());
// TRANSLATIONS
if (scopePanel.getScope().equals(ScopePanel.WORLD_SCOPE))
Ctx.project.getI18N().putTranslationsInElement(v, true);
else
Ctx.project.getI18N().putTranslationsInElement(v, false);
// UNDO
Ctx.project.getUndoStack().add(new UndoDeleteVerb(parent, v));
// the last element
if (list.getSelectedIndex() == -1)
addActions();
Ctx.project.setModified();
}
Aggregations