diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java b/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java index 44ac06e..8b549fe 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java @@ -73,6 +73,7 @@ mxCell rootCell = (mxCell) graph.getDefaultParent(); if(rootCell == null) return; if(rootCell.getChildCount() <= 0) return; + if(rootCell.getChildCount() <= layerNo) return; graph.getModel().setVisible(rootCell.getChildAt(layerNo), isEnable); graph.refresh();