示例#1
0
void
TeamWindow::BreakpointSelectionChanged(BreakpointProxyList &proxies)
{
	if (proxies.CountItems() == 0 && fActiveBreakpoint != NULL) {
		fActiveBreakpoint->ReleaseReference();
		fActiveBreakpoint = NULL;
	} else if (proxies.CountItems() == 1) {
		BreakpointProxy* proxy = proxies.ItemAt(0);
		if (proxy->Type() == BREAKPOINT_PROXY_TYPE_BREAKPOINT)
			_SetActiveBreakpoint(proxy->GetBreakpoint());
	}
	// if more than one item is selected, do nothing.
}
示例#2
0
void
BreakpointsView::_SetSelection(BreakpointProxyList& proxies)
{
	for (int32 i = 0; i < fSelectedBreakpoints.CountItems(); i++)
		fSelectedBreakpoints.ItemAt(i)->ReleaseReference();

	fSelectedBreakpoints.MakeEmpty();

	for (int32 i = 0; i < proxies.CountItems(); i++) {
		BreakpointProxy* proxy = proxies.ItemAt(i);
		if (!fSelectedBreakpoints.AddItem(proxy))
			return;
		proxy->AcquireReference();
	}

	_UpdateButtons();
}