Commit 958a8ad8 authored by Marco Descher's avatar Marco Descher

[20976] Reload kons in KonsDetailView on lock acquired event

parent 3744a563
Pipeline #16088 passed with stages
in 12 minutes and 25 seconds
...@@ -35,6 +35,7 @@ import org.eclipse.jface.viewers.LabelProvider; ...@@ -35,6 +35,7 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.window.Window; import org.eclipse.jface.window.Window;
import org.eclipse.nebula.cwt.animation.effects.SetAlpha;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Color;
...@@ -60,6 +61,8 @@ import org.eclipse.ui.part.ViewPart; ...@@ -60,6 +61,8 @@ import org.eclipse.ui.part.ViewPart;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.google.common.base.Objects;
import ch.elexis.admin.AccessControlDefaults; import ch.elexis.admin.AccessControlDefaults;
import ch.elexis.core.common.ElexisEventTopics; import ch.elexis.core.common.ElexisEventTopics;
import ch.elexis.core.constants.StringConstants; import ch.elexis.core.constants.StringConstants;
...@@ -279,7 +282,8 @@ public class KonsDetailView extends ViewPart ...@@ -279,7 +282,8 @@ public class KonsDetailView extends ViewPart
void lockedEncounter( void lockedEncounter(
@Optional @UIEventTopic(ElexisEventTopics.EVENT_LOCK_AQUIRED) IEncounter encounter){ @Optional @UIEventTopic(ElexisEventTopics.EVENT_LOCK_AQUIRED) IEncounter encounter){
if (created) { if (created) {
if (encounter.equals(actEncounter)) { if (Objects.equal(encounter, actEncounter)) {
setKons(encounter);
setUnlocked(true); setUnlocked(true);
refreshContributionItemState(); refreshContributionItemState();
} }
...@@ -290,7 +294,7 @@ public class KonsDetailView extends ViewPart ...@@ -290,7 +294,7 @@ public class KonsDetailView extends ViewPart
void unlockedEncounter( void unlockedEncounter(
@Optional @UIEventTopic(ElexisEventTopics.EVENT_LOCK_RELEASED) IEncounter encounter){ @Optional @UIEventTopic(ElexisEventTopics.EVENT_LOCK_RELEASED) IEncounter encounter){
if (created) { if (created) {
if (encounter.equals(actEncounter)) { if (Objects.equal(encounter, actEncounter)) {
save(); save();
setUnlocked(false); setUnlocked(false);
refreshContributionItemState(); refreshContributionItemState();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment