Fix sorting for texture viewer texture list

This commit is contained in:
baldurk
2021-04-20 13:51:41 +01:00
parent 6f25063eb2
commit e3eb2ee754
3 changed files with 40 additions and 6 deletions
+4 -2
View File
@@ -647,8 +647,7 @@ TextureViewer::TextureViewer(ICaptureContext &ctx, QWidget *parent)
header->setColumnStretchHints({1, -1, -1, -1, -1, -1, -1});
}
ui->textureList->header()->sortIndicatorChanged(TextureListFilter::Column_TexName,
Qt::SortOrder::DescendingOrder);
ui->textureList->sortByColumn(TextureListFilter::Column_TexName, Qt::SortOrder::AscendingOrder);
ui->zoomOption->setCurrentText(QString());
ui->fitToWindow->toggle();
@@ -3068,6 +3067,9 @@ void TextureViewer::refreshTextureList(FilterType filterType, const QString &fil
ui->textureList->setSelectedItem(root);
ui->textureList->sortByColumn(ui->textureList->header()->sortIndicatorSection(),
ui->textureList->header()->sortIndicatorOrder());
ui->textureList->setUpdatesEnabled(true);
ui->textureList->endUpdate();