Search in sources :

Example 1 with UndoDeleteOption

use of com.bladecoder.engineeditor.undo.UndoDeleteOption in project bladecoder-adventure-engine by bladecoder.

the class OptionList method delete.

@Override
protected void delete() {
    DialogOption option = removeSelected();
    int idx = parent.getOptions().indexOf(option);
    parent.getOptions().remove(option);
    // TRANSLATIONS
    Ctx.project.getI18N().putTranslationsInElement(option);
    // UNDO
    Ctx.project.getUndoStack().add(new UndoDeleteOption(parent, option, idx));
    Ctx.project.setModified();
}
Also used : UndoDeleteOption(com.bladecoder.engineeditor.undo.UndoDeleteOption) DialogOption(com.bladecoder.engine.model.DialogOption)

Aggregations

DialogOption (com.bladecoder.engine.model.DialogOption)1 UndoDeleteOption (com.bladecoder.engineeditor.undo.UndoDeleteOption)1