# HG changeset patch # User dadubrow # Date 1285014273 18000 # Node ID 8db6518f714173c513d2faab2898f95c737d84a2 # Parent 92372676713af1a07b12b11f172e0bfe1e7ed4d7 don't handle mouse up if not on widget diff -r 92372676713a -r 8db6518f7141 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/NavigationBar.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/NavigationBar.java Mon Sep 20 15:01:14 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/NavigationBar.java Mon Sep 20 15:24:33 2010 -0500 @@ -33,6 +33,8 @@ import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -69,7 +71,9 @@ addMouseListener(mouseListener = new MouseAdapter() { @Override public void mouseUp(MouseEvent e) { - setSelection(true); + Point size = Button.this.getSize(); + if (new Rectangle(0, 0, size.x, size.y).contains(e.x, e.y)) + setSelection(true); } }); }