Changeset 60

Show
Ignore:
Timestamp:
21/10/07 18:04:54 (1 year ago)
Author:
altglass
Message:

Removal of the real root of the HeapSpace? overflow

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vlcskineditor/Resources/SubBitmap.java

    r58 r60  
    8080  }   
    8181  public void update(String id_, int x_, int y_, int width_, int height_, int nbframes_, int fps_) {     
     82    id=id_; 
    8283    x=x_; 
    8384    y=y_; 
     
    8990    update(); 
    9091    s.updateResources(); 
    91     if(created) s.expandResource(id); 
    92     else s.expandResource(parent.id); 
     92    s.expandResource(id); 
    9393    created = true; 
    9494  } 
  • trunk/src/vlcskineditor/Skin.java

    r56 r60  
    582582      System.err.println("Resource of the given id is neither a Font nor a Bitmap its a "+r.type); 
    583583      return; 
    584     }    
    585     java.util.List<String> parents = new LinkedList<String>(); 
     584    }      
    586585     
    587586    Resource pr = r; 
    588     while(pr!=null) { 
    589       for(Resource res:resources) { 
    590         pr = res.getParentOf(r.id); 
    591         if(pr!=null) { 
    592           parents.add(pr.id); 
    593           break; 
    594         }         
    595       } 
    596     } 
    597     for(int i=parents.size()-1;i>=0;i--) {       
    598       TreePath tp = findInTree(m.res_tree,parents.get(i)); 
    599       if(tp==null) { 
    600         System.err.println("Could not find Parent: "+parents.get(i)); 
    601         return; 
    602       } 
    603       m.res_tree.expandPath(tp); 
    604       TreePath stp = findInTree(m.res_tree,id); 
    605       if(stp==null) return; 
    606       m.res_tree.setSelectionPath(stp); 
    607     }     
     587    for(Resource res:resources) { 
     588      if(res.getParentOf(id)!=null) { 
     589        TreePath tp = findInTree(m.res_tree,res.id); 
     590        if(tp==null) { 
     591          System.err.println("Could not find Parent: "+res.id); 
     592          return; 
     593        } 
     594        m.res_tree.expandPath(tp); 
     595        TreePath stp = findInTree(m.res_tree,id); 
     596        if(stp==null) return; 
     597        m.res_tree.setSelectionPath(stp); 
     598        break; 
     599      } 
     600    } 
    608601  } 
    609602  /** Make a Layout of the given id visible **/