Bug 463121 - Inline Checkbox-Editor does not dispose all Canvas objects
Change-Id: I231ede8b0d9bc9af3b3f2742ca20c2d9d3f3f73e
Signed-off-by: Dirk Fauth <dirk.fauth@googlemail.com>
diff --git a/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/edit/editor/CheckBoxCellEditor.java b/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/edit/editor/CheckBoxCellEditor.java
index 891524e..c0cea02 100644
--- a/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/edit/editor/CheckBoxCellEditor.java
+++ b/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/edit/editor/CheckBoxCellEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013, 2014 Original authors and others.
+ * Copyright (c) 2012, 2013, 2014, 2015 Original authors 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
@@ -7,6 +7,7 @@
*
* Contributors:
* Original authors and others - initial API and implementation
+ * Dirk Fauth <dirk.fauth@googlemail.com> - Bug 463121
******************************************************************************/
package org.eclipse.nebula.widgets.nattable.edit.editor;
@@ -50,8 +51,7 @@
* painted checkbox image.
*/
@Override
- protected Control activateCell(Composite parent,
- Object originalCanonicalValue) {
+ protected Control activateCell(Composite parent, Object originalCanonicalValue) {
// if this editor was activated by clicking a letter or digit key, do
// nothing
if (originalCanonicalValue instanceof Character) {
@@ -67,14 +67,9 @@
commit(MoveDirectionEnum.NONE, false);
if (this.editMode == EditModeEnum.INLINE) {
- // Close editor so will react to subsequent clicks on the cell
+ // Close editor so it will react to subsequent clicks on the cell
if (this.canvas != null && !this.canvas.isDisposed()) {
- this.canvas.getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- close();
- }
- });
+ close();
}
}