Only calculate the point's location if we're going to use it...

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1669 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray
2005-07-06 02:29:03 +00:00
parent 10e144a723
commit 35a851ef9a
@@ -432,16 +432,17 @@ public class DnDManager
return;
}
// determine drop location
Point pos = SwingUtilities.convertPoint(event.getComponent(),
event.getPoint(), _lastComp);
Component lastComp = _lastComp;
// reset cursors
clearComponentCursor();
clearComponentCursor(); // _lastComp cleared here
_topComp.setCursor(_topCursor);
// get the last target seen...
if (_lastTarget != null) {
// determine drop location
Point pos = SwingUtilities.convertPoint(event.getComponent(),
event.getPoint(), lastComp);
_lastTarget.dropCompleted(_source, _data[0], pos);
_source.dragCompleted(_lastTarget);
}