diff options
| author | Al <gabriel.cortesi@outlook.com> | 2019-01-01 22:57:00 +0100 |
|---|---|---|
| committer | Al <gabriel.cortesi@outlook.com> | 2019-01-01 22:57:00 +0100 |
| commit | 9a2b9224ca20f44d69029b8e7847dad32c8e96aa (patch) | |
| tree | 8eb9eef2d58389a7ec8d7505b6243db536e7f67d /src/mainwindow.cpp | |
| parent | 35995a49892a015080f52d5b863ddaf6bb8455d3 (diff) | |
Sort Separators by priority in Send To dialog.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2e1391c1..2dbf297c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -6260,10 +6260,13 @@ void MainWindow::sendSelectedModsToPriority_clicked() void MainWindow::sendSelectedModsToSeparator_clicked()
{
QStringList separators;
- for (auto mod : m_OrganizerCore.modList()->allMods()) {
- ModInfo::Ptr modInfo = ModInfo::getByIndex(ModInfo::getIndex(mod));
- if (modInfo->hasFlag(ModInfo::FLAG_SEPARATOR)) {
- separators << mod.chopped(10);
+ auto indexesByPriority = m_OrganizerCore.currentProfile()->getAllIndexesByPriority();
+ for (auto iter = indexesByPriority.begin(); iter != indexesByPriority.end(); iter++) {
+ if ((iter->second != UINT_MAX)) {
+ ModInfo::Ptr modInfo = ModInfo::getByIndex(iter->second);
+ if (modInfo->hasFlag(ModInfo::FLAG_SEPARATOR)) {
+ separators << modInfo->name().chopped(10);
+ }
}
}
|
