Project

General

Profile

Revision 59e6f340

ID59e6f340853d6d684326253ccbb0bedb66f22809
Parent 1bc810db
Child a1bd384c

Added by Katja Luther about 3 years ago

#5678. fix deletion of feature nodes

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/EditFeatureTreeWizardPage.java
37 37
import org.eclipse.swt.widgets.Composite;
38 38
import org.eclipse.swt.widgets.Label;
39 39
import org.eclipse.swt.widgets.Text;
40
import org.hibernate.proxy.HibernateProxy;
40 41

  
41 42
import eu.etaxonomy.cdm.api.service.IFeatureNodeService;
43
import eu.etaxonomy.cdm.api.service.config.FeatureNodeDeletionConfigurator;
44
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
42 45
import eu.etaxonomy.cdm.model.description.Feature;
43 46
import eu.etaxonomy.cdm.model.description.FeatureNode;
44 47
import eu.etaxonomy.cdm.model.description.FeatureTree;
......
159 162
	 *            object.
160 163
	 */
161 164
	public void setSelectedTree(FeatureTree featureTree) {
162
		this.featureTree = featureTree;
165
		this.featureTree = HibernateProxyHelper.deproxy(featureTree, FeatureTree.class);
166
		this.featureTree.setRoot(HibernateProxyHelper.deproxy(featureTree.getRoot(), FeatureNode.class));
163 167
		viewer.setInput(featureTree);
164 168

  
165 169
		text_title.removeModifyListener(this);
......
224 228
				FeatureNode featureNode = (FeatureNode) selectedObject;
225 229
				FeatureNode parent = featureNode.getParent();
226 230
				parent.removeChild(featureNode);
231
				
232
				CdmStore.getService(IFeatureNodeService.class).deleteFeatureNode(featureNode.getUuid(), new FeatureNodeDeletionConfigurator());
233
				
227 234
			}
228 235
			viewer.refresh();
229 236
		}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)