Project

General

Profile

Revision 19f11b2f

ID19f11b2f7f0c1df5630a8a6ff9fd9dbe323d5f28
Parent 7be566bc
Child e6f456aa

Added by Patrick Plitzner about 1 year ago

Fix dragging of UuidAndTitleCache objects into GA editor

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/dnd/CdmAuthorityTableDropTargetListener.java
16 16
import org.eclipse.swt.dnd.DropTargetListener;
17 17

  
18 18
import eu.etaxonomy.cdm.model.common.CdmBase;
19
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
20
import eu.etaxonomy.taxeditor.store.CdmStore;
19 21
import eu.etaxonomy.taxeditor.ui.group.grantedauthority.CdmAuthorityComposite;
20 22
import eu.etaxonomy.taxeditor.ui.group.grantedauthority.CdmAuthorityCompositeViewer;
21 23

  
......
71 73
	    else{
72 74
	        addAuthority(data);
73 75
	    }
76
	    viewer.getControl().setFocus();
74 77
	}
75 78

  
76 79
	private void addAuthority(Object authority){
77 80
	    if(CdmBase.class.isAssignableFrom(authority.getClass()) ) {
78 81
	        viewer.addCdmAuthority((CdmBase)authority);
79 82
	    }
83
	    else if(authority instanceof UuidAndTitleCache){
84
	        UuidAndTitleCache uuidAndTitleCache = (UuidAndTitleCache) authority;
85
            CdmBase cdmBase = CdmStore.getCommonService().find(uuidAndTitleCache.getType(), uuidAndTitleCache.getUuid());
86
            viewer.addCdmAuthority(cdmBase);
87
	    }
80 88
	}
81 89

  
82 90
	@Override

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)