Commit 4360b50c authored by Frédéric Larue's avatar Frédéric Larue

Bug concerning the scrolling of the tree widget when updating its content solved.

parent 7497855e
......@@ -555,6 +555,9 @@ void UIMainWindow::updateCurrentProjectContent()
for( auto s : treeView->selectedData() )
selectedItemSet.insert( s );
QScrollBar *scrollBar = treeView->verticalScrollBar();
int scrollBarValue = scrollBar->value();
treeView->updateContentBegin();
treeView->clear();
......@@ -572,13 +575,18 @@ void UIMainWindow::updateCurrentProjectContent()
}
treeView->setSortingEnabled( true );
treeView->resizeColumnToContents(0);
//treeView->resizeColumnToContents(0);
for( int i=0; i<treeView->topLevelItemCount(); ++i )
updateTreeSelection( treeView->topLevelItem(i), selectedItemSet );
}
treeView->updateContentEnd();
if( scrollBarValue <= scrollBar->maximum() )
scrollBar->setValue( scrollBarValue );
else
scrollBar->setValue( scrollBar->maximum() );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment