Skip to content

Commit

Permalink
Merge branch 'release/31.x'
Browse files Browse the repository at this point in the history
* release/31.x:
  #4538 - Lazy details and selecting annotations my break after opening a read-only document and not performing actions for a short time
  • Loading branch information
reckart committed Feb 22, 2024
2 parents a8af879 + 21fb58e commit cd1e035
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit cd1e035

Please sign in to comment.