Fixed the timeline not updating correctly when using Show Earlier.

This commit is contained in:
leo 2015-07-04 21:53:59 +00:00
parent e3b5d9395d
commit f5e9591be7

View file

@ -175,8 +175,10 @@ void lcTimelineWidget::Update(bool Clear)
{
if (PieceItemIndex >= StepItem->childCount() || PieceItem != StepItem->child(PieceItemIndex))
{
if (PieceItem->parent() == StepItem)
StepItem->removeChild(PieceItem);
QTreeWidgetItem* PieceParent = PieceItem->parent();
if (PieceParent)
PieceParent->removeChild(PieceItem);
StepItem->insertChild(PieceItemIndex, PieceItem);
}