service = (IService<T>) CdmStore.getService(IAmplificationService.class);
}
//check if original already exists in data base. If not then do not clone and all changes will be persisted directly -> Warning to user.
- if(service !=null && service.find(originalEntity.getUuid())==null){
+ if(service !=null && service.find(originalEntity.getUuid())==null && originalEntity.getId() != 0){
if(MessagingUtils.confirmDialog(TRANSIENT_EDITING_WARNING_TITLE, "["+originalEntity.getClass().getSimpleName()+"]"+originalEntity + " has to be saved before it can be edited. Save now?")){
service.save(originalEntity);
AbstractUtility.getActiveEditor().doSave(new NullProgressMonitor());
}
//be sure to reset to original in all cases
selectionElement.setEntity(originalEntity);
+ selectionElement.refresh();
}
}