Parcourir la source

removed a breakpoint bug in runover mode

Kolja Strohm il y a 6 ans
Parent
commit
b352189844
5 fichiers modifiés avec 67 ajouts et 34 suppressions
  1. 2 1
      src/bk/BKNodePlacement.java
  2. 12 6
      src/bk/BlockCalc.java
  3. 21 11
      src/bk/Combine.java
  4. 24 12
      src/bk/Compaction.java
  5. 8 4
      src/bk/ExtremalLayoutCalc.java

+ 2 - 1
src/bk/BKNodePlacement.java

@@ -177,8 +177,9 @@ public class BKNodePlacement extends AnimatedAlgorithm {
             switch( state )
             switch( state )
             {
             {
             case CONFLICTS:
             case CONFLICTS:
+                boolean selected = conflictsNode.isSelected();
                 action = conflictsNode.setSelected( true );
                 action = conflictsNode.setSelected( true );
-                if( !conflictsNode.isSelected() )
+                if( !selected )
                     breakpoint |= action == CodeAction.STOP;
                     breakpoint |= action == CodeAction.STOP;
                 do {
                 do {
                     switch( (StageStatus)(ConflictDetection.class.getMethod( fName ).invoke( conftion ) ) )
                     switch( (StageStatus)(ConflictDetection.class.getMethod( fName ).invoke( conftion ) ) )

+ 12 - 6
src/bk/BlockCalc.java

@@ -102,8 +102,9 @@ public class BlockCalc implements AlgorithmStage {
         {
         {
             inside = true;
             inside = true;
             boolean breakpoint = false;
             boolean breakpoint = false;
+            boolean selected = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected();
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
-            if( !subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected() )
+            if( !selected )
                 breakpoint |= action == CodeAction.STOP;
                 breakpoint |= action == CodeAction.STOP;
             do {
             do {
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).forwardStep() )
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).forwardStep() )
@@ -229,8 +230,9 @@ public class BlockCalc implements AlgorithmStage {
         {
         {
             inside = true;
             inside = true;
             boolean breakpoint = false;
             boolean breakpoint = false;
+            boolean selected = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected();
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
-            if( !subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected() )
+            if( !selected )
                 breakpoint |= action == CodeAction.STOP;
                 breakpoint |= action == CodeAction.STOP;
             do {
             do {
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).backwardStep() )
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).backwardStep() )
@@ -320,8 +322,9 @@ public class BlockCalc implements AlgorithmStage {
         else
         else
         {
         {
             boolean breakpoint = false;
             boolean breakpoint = false;
+            boolean selected = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected();
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
-            if( !subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected() )
+            if( !selected )
                 breakpoint |= action == CodeAction.STOP;
                 breakpoint |= action == CodeAction.STOP;
             do {
             do {
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).forwardStepOver() )
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).forwardStepOver() )
@@ -355,8 +358,9 @@ public class BlockCalc implements AlgorithmStage {
         else
         else
         {
         {
             boolean breakpoint = false;
             boolean breakpoint = false;
+            boolean selected = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected();
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
-            if( !subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected() )
+            if( !selected )
                 breakpoint |= action == CodeAction.STOP;
                 breakpoint |= action == CodeAction.STOP;
             do {
             do {
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).forwardStepOut() )
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).forwardStepOut() )
@@ -385,8 +389,9 @@ public class BlockCalc implements AlgorithmStage {
         else
         else
         {
         {
             boolean breakpoint = false;
             boolean breakpoint = false;
+            boolean selected = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected();
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
-            if( !subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected() )
+            if( !selected )
                 breakpoint |= action == CodeAction.STOP;
                 breakpoint |= action == CodeAction.STOP;
             do {
             do {
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).backwardStepOver() )
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).backwardStepOver() )
@@ -422,8 +427,9 @@ public class BlockCalc implements AlgorithmStage {
         else
         else
         {
         {
             boolean breakpoint = false;
             boolean breakpoint = false;
+            boolean selected = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected();
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
             CodeAction action = subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).setSelected( true );
-            if( !subgraphNodes.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).isSelected() )
+            if( !selected )
                 breakpoint |= action == CodeAction.STOP;
                 breakpoint |= action == CodeAction.STOP;
             do {
             do {
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).backwardStepOut() )
                 switch( subgraphAlgs.get( calcLayerIndex() ).get( calcNodeIndex( nodeIndex ) ).backwardStepOut() )

+ 21 - 11
src/bk/Combine.java

@@ -70,8 +70,9 @@ public class Combine implements AlgorithmStage {
         if( state == State.ALIGN )
         if( state == State.ALIGN )
         {
         {
             inside = false;
             inside = false;
+            boolean sel = alignNode.isSelected();
             CodeAction action = alignNode.setSelected( true );
             CodeAction action = alignNode.setSelected( true );
-            if( !alignNode.isSelected() )
+            if( !sel )
                 breakPoint |= action == CodeAction.STOP;
                 breakPoint |= action == CodeAction.STOP;
             int tblw = (int)calcMaxX( LayoutType.TOP_BOTTOM_LEFT );
             int tblw = (int)calcMaxX( LayoutType.TOP_BOTTOM_LEFT );
             int tbrw = (int)calcMaxX( LayoutType.TOP_BOTTOM_RIGHT );
             int tbrw = (int)calcMaxX( LayoutType.TOP_BOTTOM_RIGHT );
@@ -102,13 +103,14 @@ public class Combine implements AlgorithmStage {
             Color oldColor = graph.getColor( LayoutType.COMBINED );
             Color oldColor = graph.getColor( LayoutType.COMBINED );
             if( oldColor == null )
             if( oldColor == null )
                 graph.setColor( Color.BLACK, null );
                 graph.setColor( Color.BLACK, null );
-                actions.add( 0, () -> {
+            actions.add( 0, () -> {
                 inside = false;
                 inside = false;
                 loopNode.setSelected( false );
                 loopNode.setSelected( false );
                 setNode.setSelected( false );
                 setNode.setSelected( false );
                 breakPoint = false;
                 breakPoint = false;
+                boolean selected = alignNode.isSelected();
                 CodeAction ac = alignNode.setSelected( true );
                 CodeAction ac = alignNode.setSelected( true );
-                if( !alignNode.isSelected() )
+                if( !selected )
                     breakPoint |= ac == CodeAction.STOP;
                     breakPoint |= ac == CodeAction.STOP;
                 skipBackwards = ac == CodeAction.SKIP;
                 skipBackwards = ac == CodeAction.SKIP;
                 state = State.ALIGN;
                 state = State.ALIGN;
@@ -117,9 +119,10 @@ public class Combine implements AlgorithmStage {
             });
             });
             state = State.SET_COORDINATES;
             state = State.SET_COORDINATES;
             alignNode.setSelected( false );
             alignNode.setSelected( false );
+            sel = setNode.isSelected();
             CodeAction ac = setNode.setSelected( true );
             CodeAction ac = setNode.setSelected( true );
             boolean skip = ac == CodeAction.SKIP;
             boolean skip = ac == CodeAction.SKIP;
-            if( !setNode.isSelected() )
+            if( !sel )
                 breakPoint |= ac == CodeAction.STOP;
                 breakPoint |= ac == CodeAction.STOP;
             ac = loopNode.setSelected( true );
             ac = loopNode.setSelected( true );
             breakPoint |= ac == CodeAction.STOP;
             breakPoint |= ac == CodeAction.STOP;
@@ -146,8 +149,9 @@ public class Combine implements AlgorithmStage {
             {
             {
                 insideSubgraph = true;
                 insideSubgraph = true;
                 boolean breakpoint = false;
                 boolean breakpoint = false;
+                boolean sel = subgraphNodes.get( vIndex ).isSelected();
                 CodeAction ac = subgraphNodes.get( vIndex ).setSelected( true );
                 CodeAction ac = subgraphNodes.get( vIndex ).setSelected( true );
-                if( !subgraphNodes.get( vIndex ).isSelected() )
+                if( !sel )
                     breakpoint |= ac == CodeAction.STOP;
                     breakpoint |= ac == CodeAction.STOP;
                 do {
                 do {
                     switch( subgraphAlgs.get( vIndex ).forwardStep() )
                     switch( subgraphAlgs.get( vIndex ).forwardStep() )
@@ -177,8 +181,9 @@ public class Combine implements AlgorithmStage {
             actions.add( 0, () -> {
             actions.add( 0, () -> {
                 inside = true;
                 inside = true;
                 breakPoint = false;
                 breakPoint = false;
+                boolean selected = setNode.isSelected();
                 CodeAction ac = setNode.setSelected( true );
                 CodeAction ac = setNode.setSelected( true );
-                if( !setNode.isSelected() )
+                if( !selected )
                     breakPoint |= ac == CodeAction.STOP;
                     breakPoint |= ac == CodeAction.STOP;
                 skipBackwards = ac == CodeAction.SKIP;
                 skipBackwards = ac == CodeAction.SKIP;
                 ac = loopNode.setSelected( true );
                 ac = loopNode.setSelected( true );
@@ -223,8 +228,9 @@ public class Combine implements AlgorithmStage {
         {
         {
             insideSubgraph = true;
             insideSubgraph = true;
             boolean breakpoint = false;
             boolean breakpoint = false;
+            boolean selected = subgraphNodes.get( vIndex ).isSelected();
             CodeAction action = subgraphNodes.get( vIndex ).setSelected( true );
             CodeAction action = subgraphNodes.get( vIndex ).setSelected( true );
-            if( !subgraphNodes.get( vIndex ).isSelected() )
+            if( !selected )
                 breakpoint |= action == CodeAction.STOP;
                 breakpoint |= action == CodeAction.STOP;
             do {
             do {
                 switch( subgraphAlgs.get( vIndex ).backwardStep() )
                 switch( subgraphAlgs.get( vIndex ).backwardStep() )
@@ -301,8 +307,9 @@ public class Combine implements AlgorithmStage {
             else
             else
             {
             {
                 boolean breakpoint = false;
                 boolean breakpoint = false;
+                boolean selected = subgraphNodes.get( vIndex ).isSelected();
                 CodeAction action = subgraphNodes.get( vIndex ).setSelected( true );
                 CodeAction action = subgraphNodes.get( vIndex ).setSelected( true );
-                if( !subgraphNodes.get( vIndex ).isSelected() )
+                if( !selected )
                     breakpoint |= action == CodeAction.STOP;
                     breakpoint |= action == CodeAction.STOP;
                 do {
                 do {
                     switch( subgraphAlgs.get( vIndex ).forwardStepOver() )
                     switch( subgraphAlgs.get( vIndex ).forwardStepOver() )
@@ -347,8 +354,9 @@ public class Combine implements AlgorithmStage {
             else
             else
             {
             {
                 boolean breakpoint = false;
                 boolean breakpoint = false;
+                boolean selected = subgraphNodes.get( vIndex ).isSelected();
                 CodeAction action = subgraphNodes.get( vIndex ).setSelected( true );
                 CodeAction action = subgraphNodes.get( vIndex ).setSelected( true );
-                if( !subgraphNodes.get( vIndex ).isSelected() )
+                if( !selected )
                     breakpoint |= action == CodeAction.STOP;
                     breakpoint |= action == CodeAction.STOP;
                 do {
                 do {
                     switch( subgraphAlgs.get( vIndex ).forwardStepOut() )
                     switch( subgraphAlgs.get( vIndex ).forwardStepOut() )
@@ -388,8 +396,9 @@ public class Combine implements AlgorithmStage {
             else
             else
             {
             {
                 boolean breakpoint = false;
                 boolean breakpoint = false;
+                boolean selected = subgraphNodes.get( vIndex ).isSelected();
                 CodeAction action = subgraphNodes.get( vIndex ).setSelected( true );
                 CodeAction action = subgraphNodes.get( vIndex ).setSelected( true );
-                if( !subgraphNodes.get( vIndex ).isSelected() )
+                if( !selected )
                     breakpoint |= action == CodeAction.STOP;
                     breakpoint |= action == CodeAction.STOP;
                 do {
                 do {
                     switch( subgraphAlgs.get( vIndex ).backwardStepOver() )
                     switch( subgraphAlgs.get( vIndex ).backwardStepOver() )
@@ -436,8 +445,9 @@ public class Combine implements AlgorithmStage {
             else
             else
             {
             {
                 boolean breakpoint = false;
                 boolean breakpoint = false;
+                boolean selected = subgraphNodes.get( vIndex ).isSelected();
                 CodeAction action = subgraphNodes.get( vIndex ).setSelected( true );
                 CodeAction action = subgraphNodes.get( vIndex ).setSelected( true );
-                if( !subgraphNodes.get( vIndex ).isSelected() )
+                if( !selected )
                     breakpoint |= action == CodeAction.STOP;
                     breakpoint |= action == CodeAction.STOP;
                 do {
                 do {
                     switch( subgraphAlgs.get( vIndex ).backwardStepOut() )
                     switch( subgraphAlgs.get( vIndex ).backwardStepOut() )

+ 24 - 12
src/bk/Compaction.java

@@ -92,8 +92,9 @@ public class Compaction implements AlgorithmStage{
         if( state == CompactionState.PLACE_BLOCKS ) // blöcke platzieren
         if( state == CompactionState.PLACE_BLOCKS ) // blöcke platzieren
         {
         {
             inside = true;
             inside = true;
+            boolean sel = placeNode.isSelected();
             CodeAction action = placeNode.setSelected( true );
             CodeAction action = placeNode.setSelected( true );
-            if( !placeNode.isSelected() )
+            if( !sel )
                 breakPoint = action == CodeAction.STOP;
                 breakPoint = action == CodeAction.STOP;
             skip |= action == CodeAction.SKIP;
             skip |= action == CodeAction.SKIP;
             action = placeLoopNode.setSelected( true );
             action = placeLoopNode.setSelected( true );
@@ -121,8 +122,9 @@ public class Compaction implements AlgorithmStage{
                     // wechsele in die phase des Blöckeshiftens
                     // wechsele in die phase des Blöckeshiftens
                     placeNode.setSelected( false );
                     placeNode.setSelected( false );
                     placeLoopNode.setSelected( false );
                     placeLoopNode.setSelected( false );
+                    sel = applyNode.isSelected();
                     action = applyNode.setSelected( true );
                     action = applyNode.setSelected( true );
-                    if( !applyNode.isSelected() )
+                    if( !sel )
                         breakPoint |= action == CodeAction.STOP;
                         breakPoint |= action == CodeAction.STOP;
                     skip |= action == CodeAction.SKIP;
                     skip |= action == CodeAction.SKIP;
                     action = applyLoopNode.setSelected( true );
                     action = applyLoopNode.setSelected( true );
@@ -136,8 +138,9 @@ public class Compaction implements AlgorithmStage{
                         applyLoopNode.setSelected( false );
                         applyLoopNode.setSelected( false );
                         breakPoint = false;
                         breakPoint = false;
                         skip = false;
                         skip = false;
+                        boolean selected = placeNode.isSelected();
                         CodeAction ac = placeNode.setSelected( true );
                         CodeAction ac = placeNode.setSelected( true );
-                        if( !placeNode.isSelected() )
+                        if( !selected )
                             breakPoint |= ac == CodeAction.STOP;
                             breakPoint |= ac == CodeAction.STOP;
                         skip |= ac == CodeAction.SKIP;
                         skip |= ac == CodeAction.SKIP;
                         ac = placeLoopNode.setSelected( true );
                         ac = placeLoopNode.setSelected( true );
@@ -163,8 +166,9 @@ public class Compaction implements AlgorithmStage{
                     actions.add( 0, ()-> {
                     actions.add( 0, ()-> {
                         breakPoint = false;
                         breakPoint = false;
                         skip = false;
                         skip = false;
+                        boolean selected = placeNode.isSelected();
                         CodeAction ac = placeNode.setSelected( true );
                         CodeAction ac = placeNode.setSelected( true );
-                        if( !placeNode.isSelected() )
+                        if( !selected )
                             breakPoint |= ac == CodeAction.STOP;
                             breakPoint |= ac == CodeAction.STOP;
                         skip |= ac == CodeAction.SKIP;
                         skip |= ac == CodeAction.SKIP;
                         ac = placeLoopNode.setSelected( true );
                         ac = placeLoopNode.setSelected( true );
@@ -207,8 +211,9 @@ public class Compaction implements AlgorithmStage{
                             actions.add( 0, ()-> {
                             actions.add( 0, ()-> {
                                 breakPoint = false;
                                 breakPoint = false;
                                 skip = false;
                                 skip = false;
+                                boolean selected = placeNode.isSelected();
                                 CodeAction ac = placeNode.setSelected( true );
                                 CodeAction ac = placeNode.setSelected( true );
-                                if( !placeNode.isSelected() )
+                                if( !selected )
                                     breakPoint |= ac == CodeAction.STOP;
                                     breakPoint |= ac == CodeAction.STOP;
                                 skip |= ac == CodeAction.SKIP;
                                 skip |= ac == CodeAction.SKIP;
                                 ac = placeLoopNode.setSelected( true );
                                 ac = placeLoopNode.setSelected( true );
@@ -228,8 +233,9 @@ public class Compaction implements AlgorithmStage{
                             actions.add( 0, ()-> {
                             actions.add( 0, ()-> {
                                 breakPoint = false;
                                 breakPoint = false;
                                 skip = false;
                                 skip = false;
+                                boolean selected = placeNode.isSelected();
                                 CodeAction ac = placeNode.setSelected( true );
                                 CodeAction ac = placeNode.setSelected( true );
-                                if( !placeNode.isSelected() )
+                                if( !selected )
                                     breakPoint |= ac == CodeAction.STOP;
                                     breakPoint |= ac == CodeAction.STOP;
                                 skip |= ac == CodeAction.SKIP;
                                 skip |= ac == CodeAction.SKIP;
                                 ac = placeLoopNode.setSelected( true );
                                 ac = placeLoopNode.setSelected( true );
@@ -252,8 +258,9 @@ public class Compaction implements AlgorithmStage{
                             actions.add( 0, ()-> {
                             actions.add( 0, ()-> {
                                 breakPoint = false;
                                 breakPoint = false;
                                 skip = false;
                                 skip = false;
+                                boolean selected = placeNode.isSelected();
                                 CodeAction ac = placeNode.setSelected( true );
                                 CodeAction ac = placeNode.setSelected( true );
-                                if( !placeNode.isSelected() )
+                                if( !selected )
                                     breakPoint |= ac == CodeAction.STOP;
                                     breakPoint |= ac == CodeAction.STOP;
                                 skip |= ac == CodeAction.SKIP;
                                 skip |= ac == CodeAction.SKIP;
                                 ac = placeLoopNode.setSelected( true );
                                 ac = placeLoopNode.setSelected( true );
@@ -270,8 +277,9 @@ public class Compaction implements AlgorithmStage{
                             actions.add( 0, ()-> {
                             actions.add( 0, ()-> {
                                 breakPoint = false;
                                 breakPoint = false;
                                 skip = false;
                                 skip = false;
+                                boolean selected = placeNode.isSelected();
                                 CodeAction ac = placeNode.setSelected( true );
                                 CodeAction ac = placeNode.setSelected( true );
-                                if( !placeNode.isSelected() )
+                                if( !selected )
                                     breakPoint |= ac == CodeAction.STOP;
                                     breakPoint |= ac == CodeAction.STOP;
                                 skip |= ac == CodeAction.SKIP;
                                 skip |= ac == CodeAction.SKIP;
                                 ac = placeLoopNode.setSelected( true );
                                 ac = placeLoopNode.setSelected( true );
@@ -325,8 +333,9 @@ public class Compaction implements AlgorithmStage{
                         actions.add( 0, ()-> {
                         actions.add( 0, ()-> {
                             breakPoint = false;
                             breakPoint = false;
                             skip = false;
                             skip = false;
+                            boolean selected = placeNode.isSelected();
                             CodeAction ac = placeNode.setSelected( true );
                             CodeAction ac = placeNode.setSelected( true );
-                            if( !placeNode.isSelected() )
+                            if( !selected )
                                 breakPoint |= ac == CodeAction.STOP;
                                 breakPoint |= ac == CodeAction.STOP;
                             skip |= ac == CodeAction.SKIP;
                             skip |= ac == CodeAction.SKIP;
                             ac = placeLoopNode.setSelected( true );
                             ac = placeLoopNode.setSelected( true );
@@ -347,8 +356,9 @@ public class Compaction implements AlgorithmStage{
                         actions.add( 0, ()-> {
                         actions.add( 0, ()-> {
                             breakPoint = false;
                             breakPoint = false;
                             skip = false;
                             skip = false;
+                            boolean selected = placeNode.isSelected();
                             CodeAction ac = placeNode.setSelected( true );
                             CodeAction ac = placeNode.setSelected( true );
-                            if( !placeNode.isSelected() )
+                            if( !selected )
                                 breakPoint |= ac == CodeAction.STOP;
                                 breakPoint |= ac == CodeAction.STOP;
                             skip |= ac == CodeAction.SKIP;
                             skip |= ac == CodeAction.SKIP;
                             ac = placeLoopNode.setSelected( true );
                             ac = placeLoopNode.setSelected( true );
@@ -370,8 +380,9 @@ public class Compaction implements AlgorithmStage{
         {
         {
             inside = true;
             inside = true;
             skip = false;
             skip = false;
+            boolean sel = placeNode.isSelected();
             CodeAction action = applyNode.setSelected( true );
             CodeAction action = applyNode.setSelected( true );
-            if( !placeNode.isSelected() )
+            if( !sel )
                 breakPoint |= action == CodeAction.STOP;
                 breakPoint |= action == CodeAction.STOP;
             skip |= action == CodeAction.SKIP;
             skip |= action == CodeAction.SKIP;
             action = applyLoopNode.setSelected( true );
             action = applyLoopNode.setSelected( true );
@@ -396,8 +407,9 @@ public class Compaction implements AlgorithmStage{
                 inside = true;
                 inside = true;
                 breakPoint = false;
                 breakPoint = false;
                 skip = false;
                 skip = false;
+                boolean selected = placeNode.isSelected();
                 CodeAction ac = applyNode.setSelected( true );
                 CodeAction ac = applyNode.setSelected( true );
-                if( !placeNode.isSelected() )
+                if( !selected )
                     breakPoint |= ac == CodeAction.STOP;
                     breakPoint |= ac == CodeAction.STOP;
                 skip |= ac == CodeAction.SKIP;
                 skip |= ac == CodeAction.SKIP;
                 ac = applyLoopNode.setSelected( true );
                 ac = applyLoopNode.setSelected( true );

+ 8 - 4
src/bk/ExtremalLayoutCalc.java

@@ -164,8 +164,9 @@ public class ExtremalLayoutCalc implements AlgorithmStage {
         try {
         try {
             if( status == LayoutState.BLOCK_CALCULATION )
             if( status == LayoutState.BLOCK_CALCULATION )
             {
             {
+                boolean selected = bcNode.isSelected();
                 action = bcNode.setSelected( true );
                 action = bcNode.setSelected( true );
-                if( !bcNode.isSelected() )
+                if( !selected )
                     breakpoint |= action == CodeAction.STOP;
                     breakpoint |= action == CodeAction.STOP;
                 do {
                 do {
                     switch( (StageStatus)(BlockCalc.class.getMethod( fName ).invoke( bc ) ) )
                     switch( (StageStatus)(BlockCalc.class.getMethod( fName ).invoke( bc ) ) )
@@ -188,8 +189,9 @@ public class ExtremalLayoutCalc implements AlgorithmStage {
             }
             }
             else if( status == LayoutState.COMPACTION )
             else if( status == LayoutState.COMPACTION )
             {
             {
+                boolean selected = cpNode.isSelected();
                 action = cpNode.setSelected( true );
                 action = cpNode.setSelected( true );
-                if( !cpNode.isSelected() )
+                if( !selected )
                     breakpoint |= action == CodeAction.STOP;
                     breakpoint |= action == CodeAction.STOP;
                 do {
                 do {
                     switch( (StageStatus)(Compaction.class.getMethod( fName ).invoke( cp ) ) )
                     switch( (StageStatus)(Compaction.class.getMethod( fName ).invoke( cp ) ) )
@@ -229,8 +231,9 @@ public class ExtremalLayoutCalc implements AlgorithmStage {
         try {
         try {
             if( status == LayoutState.BLOCK_CALCULATION )
             if( status == LayoutState.BLOCK_CALCULATION )
             {
             {
+                boolean sel = bcNode.isSelected();
                 action = bcNode.setSelected( true );
                 action = bcNode.setSelected( true );
-                if( !bcNode.isSelected() )
+                if( !sel )
                     breakpoint |= action == CodeAction.STOP;
                     breakpoint |= action == CodeAction.STOP;
                 do {
                 do {
                     switch( (StageStatus)(BlockCalc.class.getMethod( fName ).invoke( bc ) ) )
                     switch( (StageStatus)(BlockCalc.class.getMethod( fName ).invoke( bc ) ) )
@@ -249,8 +252,9 @@ public class ExtremalLayoutCalc implements AlgorithmStage {
             }
             }
             else if( status == LayoutState.COMPACTION )
             else if( status == LayoutState.COMPACTION )
             {
             {
+                boolean sel = cpNode.isSelected();
                 action = cpNode.setSelected( true );
                 action = cpNode.setSelected( true );
-                if( !cpNode.isSelected() )
+                if( !sel )
                     breakpoint |= action == CodeAction.STOP;
                     breakpoint |= action == CodeAction.STOP;
                 do {
                 do {
                     switch( (StageStatus)(Compaction.class.getMethod( fName ).invoke( cp ) ) )
                     switch( (StageStatus)(Compaction.class.getMethod( fName ).invoke( cp ) ) )