GUI: GridWidget: Remove redundant scroll bar update

sortGroups(): Move the call to scrollBarRecalc() up and delete
superfluous code so the scroll bar is only updated once.
This commit is contained in:
PushmePullyu authored and Filippos Karapetis committed 2023-09-03 21:39:01 +03:00
1 parent 277de28b3e
commit 4c092c26ba
1 file changed
+1 -4
+1 -4
View File
@@ -599,16 +599,13 @@ void GridWidget::sortGroups() {
calcInnerHeight();
markGridAsInvalid();
_scrollBar->_currentPos = _scrollPos;
_scrollBar->checkBounds(_scrollBar->_currentPos);
_scrollPos = _scrollBar->_currentPos;
scrollBarRecalc();
if (calcVisibleEntries()) {
reloadThumbnails();
}
assignEntriesToItems();
scrollBarRecalc();
// FIXME: Temporary solution to clear/display the background ofthe scrollbar when list
// grows too small or large during group toggle. We shouldn't have to redraw the top dialog,
// but not doing so the background of scrollbar isn't cleared.