diff options
| author | Dirk Fauth | 2016-01-21 20:24:09 +0000 |
|---|---|---|
| committer | Dirk Fauth | 2016-01-21 20:24:09 +0000 |
| commit | 4988790ba81788901a9d0d907c2b09dff8e2fe16 (patch) | |
| tree | 99d2f9863e57495e8b85fec93a63e02389c8056b | |
| parent | ee9ececa52427d30e17f5b9587c5cb5577ef62f9 (diff) | |
| download | org.eclipse.nebula.widgets.nattable-4988790ba81788901a9d0d907c2b09dff8e2fe16.tar.gz org.eclipse.nebula.widgets.nattable-4988790ba81788901a9d0d907c2b09dff8e2fe16.tar.xz org.eclipse.nebula.widgets.nattable-4988790ba81788901a9d0d907c2b09dff8e2fe16.zip | |
Bug 486276 - Refresh problem with fill region border
Change-Id: Ic60e8567b606b7becfea466d4fab52977e6d9bde
Signed-off-by: Dirk Fauth <dirk.fauth@googlemail.com>
| -rw-r--r-- | org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/fillhandle/action/FillHandleDragMode.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/fillhandle/action/FillHandleDragMode.java b/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/fillhandle/action/FillHandleDragMode.java index d0a5d9c2..06ffc80d 100644 --- a/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/fillhandle/action/FillHandleDragMode.java +++ b/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/fillhandle/action/FillHandleDragMode.java @@ -32,11 +32,14 @@ import org.eclipse.nebula.widgets.nattable.viewport.command.ViewportDragCommand; import org.eclipse.swt.SWT; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; +import org.eclipse.swt.events.MenuAdapter; +import org.eclipse.swt.events.MenuEvent; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; @@ -279,7 +282,6 @@ public class FillHandleDragMode implements IDragMode { FillHandleOperation.COPY, FillHandleDragMode.this.direction, natTable.getConfigRegistry())); - reset(natTable); } }); MenuItem seriesItem = new MenuItem(this.menu, SWT.PUSH); @@ -292,7 +294,23 @@ public class FillHandleDragMode implements IDragMode { FillHandleOperation.SERIES, FillHandleDragMode.this.direction, natTable.getConfigRegistry())); - reset(natTable); + } + }); + + // add a menu listener to reset the fill state when the menu is + // closed + this.menu.addMenuListener(new MenuAdapter() { + @Override + public void menuHidden(MenuEvent e) { + // perform the reset operation asynchronously because on + // several OS the hide event is processed BEFORE the + // selection event + Display.getDefault().asyncExec(new Runnable() { + @Override + public void run() { + reset(natTable); + } + }); } }); |
