Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4538 - Lazy details and selecting annotations my break after opening a read-only document and not performing actions for a short time #4540

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static de.tudarmstadt.ukp.clarin.webanno.api.annotation.page.AnnotationEditorState.KEY_EDITOR_STATE;
import static de.tudarmstadt.ukp.clarin.webanno.api.annotation.page.AnnotationPageBase.PAGE_PARAM_DOCUMENT;
import static de.tudarmstadt.ukp.clarin.webanno.api.casstorage.CasUpgradeMode.FORCE_CAS_UPGRADE;
import static de.tudarmstadt.ukp.clarin.webanno.api.casstorage.CasUpgradeMode.NO_CAS_UPGRADE;
import static de.tudarmstadt.ukp.clarin.webanno.model.AnnotationDocumentState.IGNORE;
import static de.tudarmstadt.ukp.clarin.webanno.model.AnnotationDocumentStateChangeFlag.EXPLICIT_ANNOTATOR_USER_ACTION;
import static de.tudarmstadt.ukp.clarin.webanno.model.PermissionLevel.ANNOTATOR;
Expand Down Expand Up @@ -457,12 +458,13 @@ protected void actionLoadDocument(AjaxRequestTarget aTarget, int aFocus)
.createOrGetAnnotationDocument(state.getDocument(), state.getUser());
var stateBeforeOpening = annotationDocument.getState();

var editable = isEditable();

// Read the CAS
// Update the annotation document CAS
var editorCas = documentService.readAnnotationCas(annotationDocument,
FORCE_CAS_UPGRADE);
editable ? FORCE_CAS_UPGRADE : NO_CAS_UPGRADE);

var editable = isEditable();
applicationEventPublisherHolder.get()
.publishEvent(new BeforeDocumentOpenedEvent(this, editorCas,
getModelObject().getDocument(),
Expand Down
Loading