diff --git a/src/dlls.manifest.debug.qt6 b/src/dlls.manifest.debug.qt6 index 18845fba9..285095cd7 100644 --- a/src/dlls.manifest.debug.qt6 +++ b/src/dlls.manifest.debug.qt6 @@ -4,16 +4,15 @@ + + - - - @@ -21,22 +20,12 @@ - + - - - - - - - - - - - + diff --git a/src/dlls.manifest.qt6 b/src/dlls.manifest.qt6 index f5d1d9fdb..3bb7b655b 100644 --- a/src/dlls.manifest.qt6 +++ b/src/dlls.manifest.qt6 @@ -4,16 +4,15 @@ + + - - - @@ -21,22 +20,12 @@ - + - - - - - - - - - - - + diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 5156c3572..7c02b17b9 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -332,6 +332,7 @@ void DownloadManager::refreshList() TimeThis tt("DownloadManager::refreshList()"); try { + emit aboutToUpdate(); // avoid triggering other refreshes ScopedDisableDirWatcher scopedDirWatcher(this); @@ -2225,10 +2226,12 @@ void DownloadManager::downloadFinished(int index) "There may be an issue with the Nexus servers.")); emit update(-1); } else if (info->isPausedState() || info->m_State == STATE_PAUSING) { + emit aboutToUpdate(); info->m_Output.close(); createMetaFile(info); emit update(index); } else { + emit aboutToUpdate(); QString url = info->m_Urls[info->m_CurrentUrl]; if (info->m_FileInfo->userData.contains("downloadMap")) { foreach (const QVariant& server, diff --git a/src/modinfodialogesps.cpp b/src/modinfodialogesps.cpp index f9a3ba8c8..4de93aabe 100644 --- a/src/modinfodialogesps.cpp +++ b/src/modinfodialogesps.cpp @@ -99,6 +99,7 @@ class ESPListModel : public QAbstractItemModel public: void clear() { + beginResetModel(); m_esps.clear(); endResetModel(); } @@ -161,6 +162,8 @@ class ESPListModel : public QAbstractItemModel void finished() { + beginResetModel(); + std::sort(m_esps.begin(), m_esps.end(), [](const auto& a, const auto& b) { return (naturalCompare(a.filename(), b.filename()) < 0); }); diff --git a/src/modinfodialogtextfiles.cpp b/src/modinfodialogtextfiles.cpp index cc13e2d26..1f22d3704 100644 --- a/src/modinfodialogtextfiles.cpp +++ b/src/modinfodialogtextfiles.cpp @@ -9,6 +9,7 @@ class FileListModel : public QAbstractItemModel public: void clear() { + beginResetModel(); m_files.clear(); endResetModel(); } @@ -58,6 +59,8 @@ class FileListModel : public QAbstractItemModel void finished() { + beginResetModel(); + std::sort(m_files.begin(), m_files.end(), [](const auto& a, const auto& b) { return (naturalCompare(a.text, b.text) < 0); }); diff --git a/src/modlistview.cpp b/src/modlistview.cpp index 8cfd8b420..7b3669fd8 100644 --- a/src/modlistview.cpp +++ b/src/modlistview.cpp @@ -1078,7 +1078,8 @@ void ModListView::setOverwriteMarkers(const QModelIndexList& indexes) } } dataChanged(model()->index(0, 0), - model()->index(model()->rowCount(), model()->columnCount())); + model()->index(model()->rowCount() ? model()->rowCount() - 1 : 0, + model()->columnCount() ? model()->columnCount() - 1 : 0)); verticalScrollBar()->repaint(); } @@ -1117,7 +1118,8 @@ void ModListView::setHighlightedMods(const std::set& modNames) } } dataChanged(model()->index(0, 0), - model()->index(model()->rowCount(), model()->columnCount())); + model()->index(model()->rowCount() ? model()->rowCount() - 1 : 0, + model()->columnCount() ? model()->columnCount() - 1 : 0)); verticalScrollBar()->repaint(); }