Project

General

Profile

« Previous | Next » 

Revision a347d48a

Added by Patrick Plitzner over 5 years ago

ref #7775 Canceling reference selection does not create a description

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/CreateDescriptionHandlerE4.java
53 53
        }
54 54
        if(viewerInput instanceof TaxonBase){
55 55
            operation = createTaxonOperation(menuItem.getLocalizedLabel(), (Taxon) viewerInput, factualDataPart);
56
            AbstractUtility.executeOperation(operation, sync);
57

  
56
            if(operation!=null){
57
                AbstractUtility.executeOperation(operation, sync);
58
            }
58 59
        }
59 60
	}
60 61

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/CreateDescriptionWithSourceHandler.java
45 45
    @Override
46 46
    protected CreateTaxonDescriptionOperation createTaxonOperation(String eventLabel, Taxon taxon, IPostOperationEnabled postOperationEnabled) {
47 47
        Reference reference = ReferenceSelectionDialog.select(shell, null);
48
        if(reference==null){
49
            return null;
50
        }
48 51
        IdentifiableSource source = IdentifiableSource.NewInstance(OriginalSourceType.Unknown, null, null, reference, null);
49 52
        return new CreateTaxonDescriptionOperation(eventLabel, EditorUtil.getUndoContext(), taxon, source, postOperationEnabled);
50 53
    }

Also available in: Unified diff