Code robustness: drag and selection
authorAndrew Chadwick <andrewc-git@piffle.org>
Tue, 27 May 2014 21:40:57 +0000 (22:40 +0100)
committerAndrew Chadwick <andrewc-git@piffle.org>
Sun, 1 Jun 2014 23:14:23 +0000 (00:14 +0100)
commit5c8961691d684e0bad6a4b896988d3d36dd9a994
tree591afa87f430309b8bd19da624473d01d4df84d8
parent8943e706e3bf5a8565d9e63a33ba7a092ccf1586
Code robustness: drag and selection

Fix a rare race-condition exception during treeview updates which can
(sometimes) be triggered by repeated reloading interleaved with bashing
away at other actions. Basically do not assume that the layer data is
available in the treeview row data functions.

If the selected layer is completely removed during a drag, updates which
query it can raise an exception if they're not carefully coded. Fix three
related exceptions which can be revealed by attempting to drag the last row
of a flat structure such that it becomes a nested structure.
gui/document.py
gui/layers.py
gui/layerswindow.py
lib/layer.py