Project

General

Profile

« Previous | Next » 

Revision f18400be

Added by Katja Luther about 5 years ago

fix correct focus and selection after changing from synonym to MAN

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/ChangeToMisapplicationHandlerE4.java
50 50

  
51 51
        editor = (TaxonNameEditorE4) activePart.getObject();
52 52

  
53

  
53
        if (!EditorUtil.forceUserSaveE4Editor(editor, shell)){
54
            return ;
55
        }
54 56
		Object selectedElement = selection.getFirstElement();
55 57

  
56 58
		AbstractPostTaxonOperation operation = null;
......
59 61
        							editor.getUndoContext(), editor.getTaxon(), (Taxon) selectedElement, TaxonRelationshipType.MISAPPLIED_NAME_FOR(), editor);
60 62
        }
61 63
        if(selectedElement instanceof Synonym){
62
            if (((Synonym)selectedElement).getId() == 0){
63
                //only create a new Taxon with name of synonym, create a taxonRelationship and remove the synonym
64
            }else{
64

  
65 65
                operation = new ChangeSynonymToMisapplicationOperation(menuItem.getLocalizedLabel(),
66 66
                        editor.getUndoContext(), editor.getTaxon(), (Synonym) selectedElement, editor);
67
            }
67

  
68 68

  
69 69
        }
70 70

  
71 71

  
72
        if (!EditorUtil.forceUserSaveE4Editor(editor, shell)){
73
            return ;
74
        }
72

  
75 73
        AbstractUtility.executeOperation(operation, sync);
76 74
	}
77 75

  

Also available in: Unified diff