Project

General

Profile

« Previous | Next » 

Revision 733c1cfb

Added by Katja Luther over 5 years ago

ref #3535: add check for dirty target when move description or description elements

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
163 163
        editor.init(input);
164 164
    }
165 165

  
166
    public static MPart checkForChanges(UUID taxonUUID, EPartService partService ){
167
        Collection<MPart> parts = partService.getParts();
168
        //check if part is already opened
169
        boolean isDirty = false;
170
        for (MPart part : parts) {
171
            if(part.getObject() instanceof TaxonNameEditorE4
172
                    && ((TaxonNameEditorE4) part.getObject()).getTaxon()!=null
173
                    && ((TaxonNameEditorE4) part.getObject()).getTaxon().getUuid().equals(taxonUUID)){
174
                if (part.isDirty()){
175
                    return part;
176
                }
177

  
178
                break;
179
            }
180
        }
181
        return null;
182
    }
183

  
166 184
	/**
167 185
	 * An uninitialized taxon is one that hasn't been saved yet. As such, it
168 186
	 * should appear in neither the list of recent names nor in the taxonomic

Also available in: Unified diff