Xcos: fix recent diagrams management
[scilab.git] / scilab / modules / xcos / src / java / org / scilab / modules / xcos / block / actions / RegionToSuperblockAction.java
index d9a818a..9b28084 100644 (file)
@@ -734,7 +734,7 @@ public class RegionToSuperblockAction extends VertexSelectionDependantAction {
         if (parentGraph.getKind() == Kind.DIAGRAM) {
             parentDiagram = parentGraph.getUID();
         } else {
-            parentDiagram = parentGraph.getRootDiagram().getUID();
+            parentDiagram = parentGraph.getRootDiagramUID(controller);
         }
 
         cellsToCopy.stream().forEach(c -> {