use of com.bladecoder.engineeditor.undo.UndoDeleteScene in project bladecoder-adventure-engine by bladecoder.
the class SceneList method delete.
@Override
protected void delete() {
Scene s = removeSelected();
parent.getScenes().remove(s.getId());
// init_scene
if (parent.getInitScene() != null && parent.getInitScene().equals(s.getId())) {
if (parent.getScenes().size() > 0)
parent.setInitScene(parent.getScenes().values().iterator().next().getId());
else
parent.setInitScene(null);
}
// TRANSLATIONS
Ctx.project.getI18N().putTranslationsInElement(s);
// UNDO
UndoOp undoOp = new UndoDeleteScene(s);
Ctx.project.getUndoStack().add(undoOp);
Ctx.project.setModified();
}
Aggregations