In the immediate aftermath of the Orlando shootings, I had a conversation with a fellow political scientist who was absolutely convinced that the incident would help Trump. This individual had zero doubt-- it was only a question of how much. I was more skeptical, and I was right. We have consistently seen Trump fail to benefit from such incidents, including New York, at least so far.
The irony is that there was reasonably well-established political science on the side of "Trump would gain." The critical concept is called "issue ownership." The idea is that there are certain issues that are "owned" by one party, meaning that voters are more likely to think that one party does a better job on them. Republicans do better on national security, and Democrats do better on education, for example. Terrorist incidents bring national security to the forefront, giving Republicans an advantage, helping Trump, right?
The problem with this, and the main reason I have been skeptical, has been the Clinton versus Trump comparison. Former Secretary of State involved in the operation to kill Bin Laden versus reality tv star. Then again, my entire discipline thought a reality tv star couldn't get the nomination, so... Regardless, it was not obvious to me that the normal process of issue ownership would play out this year with that kind of asymmetry, and the polling has borne that out. Trump has not seen his polling numbers spike around terrorist incidents.
Then again, a bigger attack would almost certainly cause the numbers to move more, and even a continuation of smaller attacks would be cumulative. This thing ain't over yet.