#5256 Set entity container in Bulk Editor to dirty when media is updated
authorCherian Mathew <c.mathew@bgbm.org>
Wed, 21 Oct 2015 15:13:49 +0000 (17:13 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Wed, 21 Oct 2015 15:13:49 +0000 (17:13 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaViewPart.java

index 527cfe3f9027d0094564fdbd67e91afc7c55e06e..331526d40397a50d0d24cd73c10560d87031aced 100644 (file)
@@ -34,6 +34,7 @@ import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasMedia;
 import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
 import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
 import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart;
@@ -134,6 +135,10 @@ public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartCon
            // take a look at ISaveblePart
            if(part instanceof BulkEditor && !(object instanceof SpecimenOrObservationBase<?>)){
                ((BulkEditor) part).forceDirty();
+               if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
+                ((BulkEditor) part).changed(selection.getFirstElement());
+            }
            }
            super.changed(object);
        }