bbreslauer / PySciPlot

GNU General Public License v3.0
1 stars 0 forks source link

Model index internalPointers need to be changed #28

Closed bbreslauer closed 13 years ago

bbreslauer commented 13 years ago

Currently (at least in the WavesListModel) the data (the waves) is external to the model. This presents a problem when creating internalPointers during index() calls, because when doing a drag and drop, the indexes are no longer valid just before removeRows is called, and so the rows are not removed.

A way to get around this is to have self._waves be a list instead of a Waves() object, but that introduces other issues (like how many of these models rely on being integrated with the app's Waves object, so that they are automatically updated when a wave is added/renamed/removed from the application). I need to come up with an elegant solution to this, that also enables drag and drop.