* Emit signal when GraphicScene.addItem() is used
Emit a signal (sigItemAdded) just after adding an item to a scene.
The item object is emited as the only signal argument.
This signal is useful for code that may want to react to newly added
items of a plot.
* Emit signal when GraphicScene.removeItem() is used
Emit a signal (sigItemRemoved) just after removing an item from a scene.
The item object is emited as the only signal argument.
This signal is useful for code that may want to react to removed
items in a plot.
* py3k: Remove reduce calls.
* py3k: Remove compatibility sortList function.
Sorting by key has existed since Python 2.4.
* Remove unnecessary sys.path manipulation.
This file doesn't have any __main__ code to run anyway.
* Use context manager
In lines 174 and 191 cev[0] is being accessed when cev is an empty list. I get this error when inheriting from GraphicsLayoutWidget and overloading mouseDoubleClickEvent.
This occurred because the scene does not receive mouse move events while a context menu is displayed.
If the user right-clicks on a new location while the menu is open, then the click event is delieverd as if the mouse had not moved.
Corrected by sending a just-in-time hover event immediately before mouse press, if the cursor has moved.
The main change is on `ViewBox.getContextMenus`, which now returns an
up-to-date of actions that `GraphicsScene.addParentContextMenus` can use.
Also, `getContextMenus` was given a default implementation in the base
class (falling back on `getMenu` if defined), and some cleanup was done.
- AxisItem shows 2 tick levels instead of 3
- Lots of boundingRect and dataBounds caching
(improves ViewBox auto-range performance, especially with multiple plots)
- GraphicsScene avoids testing for hover intersections with non-hoverable items
(much less slowdown when moving mouse over plots)
These are deep changes; need good testing before we release them.