Richard Lake
Changed how storypanel.py keeps track of widgets from a list to a dict keyed on their title.
This is in order to speed up getConnectedWidgets which is used to paint widgets. The linear scan through a list was using a unreasonable amount of time in stories with large numbers of widgets.
 On a test story with ~800 passages this went from 13.7  to 0.137 milli-seconds per call.
Richard Lake
Slightly speed up lineIntersection.
Speed up lineRectIntersection with Cohen–Sutherland algorithm instead of testing against all four lines
 ~4 times faster on my machine
Richard Lake
Fixed the tweaking on the connector lines to not break at higher zoom levels.
Richard Lake
Richard Lake
Changed how storypanel.py keeps track of widgets from a list to a dict keyed on their title.
This is in order to speed up getConnectedWidgets which is used to paint widgets. The linear scan through a list was using a unreasonable amount of time in stories with large numbers of widgets.
 On a test story with ~800 passages this went from 13.7  to 0.137 milli-seconds per call.
Speed up lineRectIntersection with Cohen–Sutherland algorithm instead of testing against all four lines
 ~4 times faster on my machine
Richard Lake
Fixing some errors I missed