From 4c5546d03863b23448e6d207a9b0711ac0201b45 Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Thu, 11 Sep 2014 11:27:20 +0200 Subject: Bug 443787 - [terminals] SWT Error: "Cannot Initialize Drag" when dragging tabs between views Change-Id: I9e6b4918bebb1af69caeadad16441c3399b58d20 Signed-off-by: Anton Leherbauer --- .../src/org/eclipse/tcf/te/ui/terminals/view/TerminalsView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/view/TerminalsView.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/view/TerminalsView.java index 1b909140f..3da443ef5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/view/TerminalsView.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/view/TerminalsView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -197,6 +197,9 @@ public class TerminalsView extends ViewPart implements ITerminalsView { // only for own tab folders if (event.widget != tabFolderControl) return; + // Skip drag if DnD is still ongoing (bug 443787) + if (tabFolderControl.getData(DND.DRAG_SOURCE_KEY) != null) return; + final CTabFolder draggedFolder = (CTabFolder) event.widget; int operations = DND.DROP_MOVE | DND.DROP_DEFAULT; -- cgit v1.2.3