We have some fresh commentary on BR#2394, the dreaded autoscroll bug, which 
might now be reproducible, so I started digging.  I really do not understand 
much about how the Java Autoscroll interface is supposed to work, but in 
ColonyPanel.java / ASingleBuildingPanel.autoscroll():

                    vp.setViewPosition(new Point(vp.getViewPosition().x,
                                                 
Math.min(vp.getViewPosition().y 
+ SCROLL_SPEED,
                                                          
colonyPanel.buildingsPanel.getHeight()
                                                          - vp.getHeight())));

... ISTM that vp refers to the enclosing ColonyPanel, and thus its height will 
always be bigger than the buildingsPanel height, and thus the second value to 
Math.min will always be negative.  Does that make sense?  This looks like 
fairly old code (last edit was me, but that was just code motion), so I am 
doubly cautious.  OTOH, the bug is old too.

Cheers,
Mike Pope

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to