Bug 41927 [Dialogs] Selecting in PreferenceDialog generates too many invalid entries
20030825 If you select an entry, close the dialog and then reopen it selecting anotehr entry will result in a "this page has invalid values" although you selected nothing.
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
}
		return null;
	}
	/**
	 * Clear the last selected node. This is so that we not chache
	 * the last selection in case of an error.
	 */
	private void clearSelectedNode() {
		setSelectedNodePreference(null);
	}
	/**
	 * Save the currently selected node. 
	 */
	private void setSelectedNode() {
		String storeValue = null;
		if (tree.getSelectionCount() == 1) {
			TreeItem currentSelection = tree.getSelection()[0];
			Object data = currentSelection.getData();
			if (currentSelection.getData() instanceof IPreferenceNode)
				storeValue = ((IPreferenceNode) data).getId();
		}
		setSelectedNodePreference(storeValue);
	}
	/**
	 * Display the given error message. The currently displayed message
	 * is saved and will be redisplayed when the error message is set
	 * to <code>null</code>.
	 *
	 * @param errorMessage the errorMessage to display or <code>null</code>
	 */