Browse Source

fix breakpoints

Eren Yilmaz 6 years ago
parent
commit
1b6de0485f
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/animation/PseudoCodeNode.java

+ 3 - 3
src/animation/PseudoCodeNode.java

@@ -56,11 +56,11 @@ public class PseudoCodeNode extends DefaultMutableTreeNode {
     
     public boolean setSelected( boolean selected )
     {
-        if( selected && breakPoint )
+        if( !this.selected && selected && breakPoint )
             controller.setContinuous( false );
-        if( selected )
+        if( !this.selected && selected )
             tree.expandPath( new TreePath( this.getPath() ) );
-        else
+        else if (this.selected && !selected && !breakPoint)
             tree.collapsePath( new TreePath( this.getPath() ) );
         this.selected = selected;
         return !breakPoint || !selected;