public void selectionChanged(TagListPanel panel) {

		Function function = getFunction(currentLocation);

		if (panel instanceof SourceTagsPanel) {
			buttonPanel.sourcePanelSelectionChanged(function != null);
			targetPanel.clearSelection();
		}
		else if (panel instanceof TargetTagsPanel) {
			buttonPanel.targetPanelSelectionChanged(function != null);
			sourcePanel.clearSelection();
		}

		Set<FunctionTag> sourceTags = sourcePanel.getSelectedTags();
		Set<FunctionTag> targetTags = targetPanel.getSelectedTags();
		sourceTags.addAll(targetTags);
		allFunctionsPanel.setSelectedTags(sourceTags);
	}
Updates the button panel depending on the selection state of the
tag lists. Also updates the {@link AllFunctionsPanel} so it can update
its list.

@param panel the panel that generated the selection event
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/tags/FunctionTagProvider.java