ole32: Don't send data changes in DataAdviseHolder_Advise for

ADVF_PRIMEFIRST connections if we are connected to a data object,
since it will send the data change for us.
This commit is contained in:
Robert Shearman 2006-08-31 17:20:09 +01:00 committed by Alexandre Julliard
parent 53d01d2764
commit 5e9df71e0e

View file

@ -728,9 +728,6 @@ static HRESULT WINAPI DataAdviseHolder_Advise(
if (This->Connections[index].sink != NULL) {
IAdviseSink_AddRef(This->Connections[index].sink);
if(advf & ADVF_PRIMEFIRST) {
IDataAdviseHolder_SendOnDataChange(iface, pDataObject, 0, advf);
}
/* if we are already connected advise the remote object */
if (This->delegate)
@ -748,6 +745,10 @@ static HRESULT WINAPI DataAdviseHolder_Advise(
}
This->Connections[index].advf |= WINE_ADVF_REMOTE;
}
else if(advf & ADVF_PRIMEFIRST)
/* only do this if we have no delegate, since in the above case the
* delegate will do the priming for us */
IDataAdviseHolder_SendOnDataChange(iface, pDataObject, 0, advf);
}
/*
* Return the index as the cookie.