Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 2581

Summary: Perspective layout modifications are too easy to perform by mistake (1GGNLJH)
Product: [Eclipse Project] Platform Reporter: Philipe Mulet <philippe_mulet>
Component: UIAssignee: Kevin Haaland <Kevin_Haaland>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: usability
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: Windows NT   
Whiteboard:

Description Philipe Mulet CLA 2001-10-10 22:39:12 EDT
When manipulating the IDE, I often end up moving a view around by mistake, and have no undo functionality. Would it be envisageable
to have this functionality ? I end up having to reset the perspective alltogether, loosing all customizations at once (and therefore
discouraging to perform any).

NOTES:
	EJP (7/31/01 2:47:47 PM)
		We could fix CTabPartDragDrop>>#mouseDown to avoid dragging from the CTabFolder borders.
		Making it more dificulty to move views by mistake.

	EJP (7/31/01 2:50:21 PM)
		Here is a changed version of mouseDown:

public void mouseDown(MouseEvent e) {
	if (e.button != 1) return;

	// Verify that the tab under the mouse pointer
	// is the same as for this drag operation
	CTabFolder tabFolder = getCTabFolder();
	CTabItem tabUnderPointer = tabFolder.getItem(new Point(e.x, e.y));
	if (tabUnderPointer != tab)
		return;
	if(tabUnderPointer == null) {
		//Avoid drag from the borders.
		Rectangle clientArea = tabFolder.getClientArea();
		if((tabFolder.getStyle() & SWT.TOP) != 0) {
			if(e.y > clientArea.y)
				return;
		} else {
			if(e.y < clientArea.y + clientArea.height)
				return;
		}
	}

	super.mouseDown(e);
}
Comment 1 DJ Houghton CLA 2001-10-29 19:02:11 EST
PRODUCT VERSION:
SDK 125

Comment 2 Eduardo Pereira CLA 2001-12-04 12:07:06 EST
Proposed change is already released.