diff options
Diffstat (limited to 'platform/platform-api/src/com/intellij/ui/MouseDragHelper.java')
-rw-r--r-- | platform/platform-api/src/com/intellij/ui/MouseDragHelper.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/platform-api/src/com/intellij/ui/MouseDragHelper.java b/platform/platform-api/src/com/intellij/ui/MouseDragHelper.java index 3aab2f8df622..67f78579e660 100644 --- a/platform/platform-api/src/com/intellij/ui/MouseDragHelper.java +++ b/platform/platform-api/src/com/intellij/ui/MouseDragHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,6 +38,7 @@ public abstract class MouseDragHelper implements MouseListener, MouseMotionListe private final JComponent myDragComponent; private Point myPressPointScreen; + protected Point myPressedOnScreenPoint; private Point myPressPointComponent; private boolean myDraggingNow; @@ -114,6 +115,7 @@ public abstract class MouseDragHelper implements MouseListener, MouseMotionListe if (!canStartDragging(e)) return; myPressPointScreen = new RelativePoint(e).getScreenPoint(); + myPressedOnScreenPoint = new Point(myPressPointScreen); myPressPointComponent = e.getPoint(); processMousePressed(e); @@ -144,6 +146,7 @@ public abstract class MouseDragHelper implements MouseListener, MouseMotionListe } } finally { + myPressedOnScreenPoint = null; resetDragState(); e.consume(); if (myDetachPostponed) { |