+
+ if (svg != null && svg instanceof Resource) {
+ Resource resource = (Resource) svg;
+ // 7. Put the element on all the currently active layers if possible.
+ IModifiableSynchronizationContext context = idiagram.getHint(SynchronizationHints.CONTEXT);
+ GraphLayerManager glm = context.get(GraphSynchronizationHints.GRAPH_LAYER_MANAGER);
+ if (glm != null) {
+ glm.removeFromAllLayers(g, resource);
+ glm.putElementOnVisibleLayers(idiagram, g, resource);
+ }
+ }