For some reason the QTreeWidgetItem passed as previous to __currentItemChanged retains its former index (despite the fact that logically, by the time the method is called, a different QTreeWidgetItem should reside there now) but appears to have lost its references to its "column widgets".
Thus, when we request each of the "column widgets" in turn, they can't be found.
When removing a row, we don't really need to set the styles of a QTreeWidgetItem that's being removed... so let's not.
As to moving a row, the QTreeWidgetItem returned by self.takeTopLevelItem in __cueMoved has the "column widgets" we're looking for. So let's apply __updateItemStyle on that instead.
(Should fix #180, caused by changes in fd883a43.)
For some reason the
QTreeWidgetItem
passed asprevious
to__currentItemChanged
retains its former index (despite the fact that logically, by the time the method is called, a differentQTreeWidgetItem
should reside there now) but appears to have lost its references to its "column widgets".Thus, when we request each of the "column widgets" in turn, they can't be found.
When removing a row, we don't really need to set the styles of a
QTreeWidgetItem
that's being removed... so let's not.As to moving a row, the
QTreeWidgetItem
returned byself.takeTopLevelItem
in__cueMoved
has the "column widgets" we're looking for. So let's apply__updateItemStyle
on that instead.