IDEA-80459 allow drag to finish before detaching drag helper
authorDennis Ushakov <dennis.ushakov@gmail.com>
Sun, 29 Jan 2012 12:52:44 +0000 (16:52 +0400)
committerDennis Ushakov <dennis.ushakov@gmail.com>
Sun, 29 Jan 2012 13:05:20 +0000 (17:05 +0400)
platform/platform-api/src/com/intellij/ui/MouseDragHelper.java

index 67e6abaaeb03028f255a12813c8c1281c3020487..49f2dc3eba381dfd6d5adbd3e2ff9781ae12406a 100644 (file)
@@ -75,6 +75,10 @@ public abstract class MouseDragHelper implements MouseListener, MouseMotionListe
   }
 
   private void attach() {
   }
 
   private void attach() {
+    if (myDetachPostponed) {
+      myDetachPostponed = false;
+      return;
+    }
     myGlassPane = IdeGlassPaneUtil.find(myDragComponent);
     myGlassPane.addMousePreprocessor(this, myParentDisposable);
     myGlassPane.addMouseMotionPreprocessor(this, myParentDisposable);
     myGlassPane = IdeGlassPaneUtil.find(myDragComponent);
     myGlassPane.addMousePreprocessor(this, myParentDisposable);
     myGlassPane.addMouseMotionPreprocessor(this, myParentDisposable);