public void setHasSelection(boolean b) {
		if (hasSelection == b) {
			return;
		}
		hasSelection = b;
		if (b) {
			if (autoResrictSelection) {
				// autoRestrictSelection means to auto turn on restrict search to selection when
				// a selection happens
				isSearchSelectionOnly = true;
			}
		}
		else {
			// if no selection, then we can't search in a selection!
			isSearchSelectionOnly = false;
		}

		notifySettingsChanged(settings);
	}
Maintains the state of all the settings and controls for the memory search window.
Ghidra/Features/Base/src/main/java/ghidra/features/base/memsearch/gui/SearchGuiModel.java