pyqtgraph/pyqtgraph — pull request #38 by fabioz (2014-02-27 19:14:24+00:00)
Title: Fix crash on ViewBox on PySide 1.2.1 / Fixed exception in pyqtgraph.graphicsItems.ViewBox.ViewBox.ViewBox.mouseDragEvent

I just realized that I had trim-whitespaces enabled. Hope you don't mind...

As for the fixes, one is a simple one: in the mouseDragEvent the translateBy is only done if both x and y are not None (as this was a valid condition).

As for the crash, I can't say exactly how to reproduce it, but it happened reliably in my test-suite (which had many other things and pyqtgraph was the part that was crashing). In the test suite I created and deleted a number of graph windows -- and the crash never happened on the first one, only on subsequent requests.

Also note that in the test suite qt wasn't processing the events all the time, so, this could have some relation to the crash happening here... The comments in the commit should explain it better.