short hotfix for wrong dirty flag after change synonym to misapplication
authorKatja Luther <k.luther@bgbm.org>
Tue, 19 Apr 2016 11:15:13 +0000 (13:15 +0200)
committerKatja Luther <k.luther@bgbm.org>
Tue, 19 Apr 2016 11:15:13 +0000 (13:15 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/MultiPageTaxonEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeToMisapplicationHandler.java

index e58a897b2426f9d5d69d82de6188620a37fa4ccf..0f94566a9c51d426b503a98f85749a40bca474d4 100644 (file)
@@ -304,8 +304,11 @@ IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
     @Override
     public void changed(Object element) {
         // setDirty(true);
     @Override
     public void changed(Object element) {
         // setDirty(true);
-        dirty = true;
-        super.editorDirtyStateChanged();
+        if (element != null){
+            dirty = true;
+            super.editorDirtyStateChanged();
+        }
+
         if (element instanceof TaxonBase) {
             TaxonNameEditor page = (TaxonNameEditor) getPage(Page.NAME);
             AbstractGroupedContainer container = page.getContainer((TaxonBase) element);
         if (element instanceof TaxonBase) {
             TaxonNameEditor page = (TaxonNameEditor) getPage(Page.NAME);
             AbstractGroupedContainer container = page.getContainer((TaxonBase) element);
index a3b53d3584b566b7bcf0a48798bb5ac0816402ef..46f63986f6ba82309199576d501d46bb154b9362 100644 (file)
@@ -68,7 +68,9 @@ public class ChangeToMisapplicationHandler extends AbstractHandler implements
                                                editor.getUndoContext(), editor.getTaxon(), (Synonym) selectedElement, editor);
                        }
 
                                                editor.getUndoContext(), editor.getTaxon(), (Synonym) selectedElement, editor);
                        }
 
+
                        EditorUtil.executeOperation(operation);
                        EditorUtil.executeOperation(operation);
+
                } catch (NotDefinedException e) {
                        logger.warn("Command name not set");
                }
                } catch (NotDefinedException e) {
                        logger.warn("Command name not set");
                }