Search in sources :

Example 1 with UndoDeleteVerb

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();
}
Also used : UndoDeleteVerb(com.bladecoder.engineeditor.undo.UndoDeleteVerb) UndoDeleteVerb(com.bladecoder.engineeditor.undo.UndoDeleteVerb) Verb(com.bladecoder.engine.model.Verb)

Aggregations

Verb (com.bladecoder.engine.model.Verb)1 UndoDeleteVerb (com.bladecoder.engineeditor.undo.UndoDeleteVerb)1