This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 118508

Summary: Weird scroll of the scene view on Windows OS
Product: platform Reporter: David Kaspar <dkaspar>
Component: GraphAssignee: issues@platform <issues>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description David Kaspar 2007-10-11 09:39:33 UTC
1) Run AlignWithClientAreaTest example on Windows OS machine.
2) Resize the frame to show on a half of "Label 2"
3) Hold Ctrl key and press left-mouse button on "Label 2"
4) ERROR - the scene view is scrolled even thought it should not be since the the mouse cursor is still within the scene
view
Comment 1 David Kaspar 2007-11-19 12:31:47 UTC
The problem is that pressing left mouse button while Ctrl key is pressed on Windows, Swing invokes additional
keyPressed(KeyEvent.VK_CONTROL) method call after mousePressed method event. At that time MoveAction is already in
locked state and therefore "SceneComponent.processKeyOperator" method invokes "scrollRectToVisible" method to show whole
bounds of locked-widget to visible area.
This is a problem since the same code is used for actions that are locking the scene and a key is invoked during their
locked state period. Then the library automatically shows whole booundary in visible area.
On Linux, keyPressed is fired correctly before mousePressed events - therefore the issue is not reproducible there.
I am scared to remove the line particular "scrollRectToVisible" method call since it is in a core of the library and may
unexpectedly affect behavior another actions (built-in actions should be safe with the change - maybe Edit action may
cause a problem).
If you want to, please, try to remove line containing "scrollRectToVisible" method call within
SceneComponent.processKeyOperator method. If it would not affect anybody, then we can integrate the change. Thanks.