FrancescoCeruti / linux-show-player

Linux Show Player - Cue player designed for stage productions
https://linux-show-player.org
GNU General Public License v3.0
205 stars 49 forks source link

Potential fix for issue 180 #181

Closed s0600204 closed 5 years ago

s0600204 commented 5 years ago

(Should fix #180, caused by changes in fd883a43.)

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.

FrancescoCeruti commented 5 years ago

Thanks :-)