Commit cf3e8f45 authored by Thomas Huster's avatar Thomas Huster

[16539] fixed editing of conditions

parent ca48853d
Pipeline #11451 passed with stages
in 4 minutes and 29 seconds
......@@ -32,6 +32,7 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.ToolBar;
import ca.odell.glazedlists.BasicEventList;
......@@ -149,7 +150,7 @@ public class DiagnoseListComposite extends Composite {
if (selection instanceof StructuredSelection && !selection.isEmpty()) {
ICondition condition =
(ICondition) ((StructuredSelection) selection).getFirstElement();
AcquireLockBlockingUi.aquireAndRun((IPersistentObject) condition,
AcquireLockBlockingUi.aquireAndRun(condition,
new ILockHandler() {
@Override
public void lockFailed(){
......@@ -159,7 +160,8 @@ public class DiagnoseListComposite extends Composite {
@Override
public void lockAcquired(){
ConditionEditDialog dialog =
new ConditionEditDialog(condition, getShell());
new ConditionEditDialog(condition,
Display.getDefault().getActiveShell());
if (dialog.open() == Dialog.OK) {
dialog.getCondition().ifPresent(c -> {
source.getNatTable().refresh();
......
......@@ -13,6 +13,7 @@ import org.eclipse.swt.widgets.Shell;
import ch.elexis.core.findings.ICondition;
import ch.elexis.core.findings.ICondition.ConditionCategory;
import ch.elexis.core.findings.ui.composites.ConditionComposite;
import ch.elexis.core.findings.ui.services.FindingsServiceComponent;
public class ConditionEditDialog extends TitleAreaDialog {
......@@ -56,6 +57,7 @@ public class ConditionEditDialog extends TitleAreaDialog {
protected void okPressed(){
conditionComposite.udpateModel();
condition = conditionComposite.getCondition();
FindingsServiceComponent.getService().saveFinding(condition.get());
super.okPressed();
}
......
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