From 9d17f71033828646d058d47ef8b9db8f50ffc48b Mon Sep 17 00:00:00 2001 From: Jeremy Hu Date: Thu, 12 Mar 2020 23:02:56 +0930 Subject: [PATCH] Fix wrong unsave state Document title shows wrong unsave state when open a document with part group existed --- src/parttreewidget.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/parttreewidget.cpp b/src/parttreewidget.cpp index 90315514..d381b16b 100644 --- a/src/parttreewidget.cpp +++ b/src/parttreewidget.cpp @@ -1105,15 +1105,6 @@ void PartTreeWidget::reloadComponentChildren(const QUuid &componentId) } deleteItemChildren(parentItem); addComponentChildrenToItem(componentId, parentItem); - - // Fix the last item show in the wrong place sometimes - int childCount = m_rootItem->childCount(); - if (childCount > 0) { - QTreeWidgetItem *lastItem = m_rootItem->child(childCount - 1); - bool isExpanded = lastItem->isExpanded(); - lastItem->setExpanded(!isExpanded); - lastItem->setExpanded(isExpanded); - } } void PartTreeWidget::removeAllContent()