Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [nebula-dev] CDateTime

I find that if I insert a call to redraw in the picker dispose method, the workbench menu bar refreshes.  This is a workaround, not a fix.  The menu bar still is erased prior to entry to the dispose method.

	private void disposePicker() {
		if (content != null) {
			if (picker != null) {
				picker.dispose();
				picker = null;
			}
			if (isDropDown()) {
				Control c = content;
				setContent(null);
				c.dispose();
				if (contentShell != null) {
					contentShell.getParent().redraw();                     <<<<<====== workaround
					Display.getDefault().asyncExec(new Runnable() {
						public void run() {
							if (contentShell != null
									&& !contentShell.isDisposed()) {
								contentShell.dispose();
								contentShell = null;
							}
						}
					});
				}
			}
		}
	}


Back to the top