Selaa lähdekoodia

noch ein fehler weniger

Kolja Strohm 6 vuotta sitten
vanhempi
commit
531d8409b4
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      src/bk/ExtremalLayoutCalc.java

+ 5 - 5
src/bk/ExtremalLayoutCalc.java

@@ -81,7 +81,7 @@ public class ExtremalLayoutCalc implements AlgorithmStage {
         {
             LayoutState oldState = status;
             StageStatus stage = StageStatus.UNFINISHED;
-            while( status == oldState && stage != StageStatus.FINISHED )
+            while( status == oldState && stage == StageStatus.UNFINISHED )
                 stage = forwardStep();
             return stage;
         }
@@ -94,7 +94,7 @@ public class ExtremalLayoutCalc implements AlgorithmStage {
         if( !inside )
         {
             StageStatus status = StageStatus.UNFINISHED;
-            while( status != StageStatus.FINISHED )
+            while( status == StageStatus.UNFINISHED )
                 status = forwardStep();
             return status;
         }
@@ -108,7 +108,7 @@ public class ExtremalLayoutCalc implements AlgorithmStage {
         {
             LayoutState oldState = status;
             StageStatus stage = StageStatus.UNFINISHED;
-            while( status == oldState && stage != StageStatus.FINISHED )
+            while( status == oldState && stage == StageStatus.UNFINISHED )
                 stage = backwardStep();
             return stage;
         }
@@ -121,7 +121,7 @@ public class ExtremalLayoutCalc implements AlgorithmStage {
         if( !inside )
         {
             StageStatus status = StageStatus.UNFINISHED;
-            while( status != StageStatus.FINISHED )
+            while( status == StageStatus.UNFINISHED )
                 status = backwardStep();
             return status;
         }
@@ -155,7 +155,7 @@ public class ExtremalLayoutCalc implements AlgorithmStage {
             else if( status == LayoutState.COMPACTION )
             {
             	if( !cpNode.isSelected() )
-                breakpoint |= !cpNode.setSelected( true );
+            	    breakpoint |= !cpNode.setSelected( true );
                 switch( (StageStatus)(Compaction.class.getMethod( fName ).invoke( cp ) ) )
                 {
                 case FINISHED: