Project

General

Profile

« Previous | Next » 

Revision 9d38e970

Added by Patrick Plitzner about 5 years ago

ref #8225 Fix deletion of not persisted type designations

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java
157 157
		boolean removeTypeDesignationFromAllTypifiedNames = PreferencesUtil.getBooleanValue(IPreferenceKeys.ADD_TYPES_TO_ALL_NAMES);
158 158
		TaxonName entity = removeTypeDesignationFromAllTypifiedNames ? null : getEntity();
159 159
		DetailsPartE4 detailsView = AbstractUtility.getDetailsView(getFormFactory().getContext().get((EPartService.class)));
160
		if(detailsView!=null
160
		if(!element.isPersited() && entity!=null){
161
            entity.removeTypeDesignation(element);
162
		}
163
		else if(detailsView!=null
161 164
		        && detailsView.getSelectionProvidingPart().getObject() instanceof ITaxonEditor
162 165
		        && detailsView.getSelectionProvidingPart().getObject() instanceof IPostOperationEnabled) {
163 166
            DeleteTypeDesignationOperation operation = new DeleteTypeDesignationOperation(
......
169 172
                    null);
170 173
            ((ITaxonEditor) detailsView.getSelectionProvidingPart().getObject()).addOperation(operation);
171 174
		}
172
		if(entity!=null){
173
		    entity.removeTypeDesignation(element);
174
		}
175 175
		updateToolbar();
176 176
	}
177 177

  

Also available in: Unified diff