diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-04-17 21:16:44 +0200 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-04-17 21:51:22 +0200 |
| commit | f2762035171f60fdd0b16052c07f67a0f79d60a8 (patch) | |
| tree | 08cac174a87692239dade12dd388535216991ccd /src/mainwindow.cpp | |
| parent | b64fd1ed4d68fc64ac061b0f126af54cf7147462 (diff) | |
Changed mod Information dialog "Next" and "Previous" buttons to remember the currently viewed tab.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2d6ccc94..00c7895e 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2464,8 +2464,8 @@ void MainWindow::displayModInformation(ModInfo::Ptr modInfo, unsigned int index, connect(&dialog, SIGNAL(nexusLinkActivated(QString)), this, SLOT(nexusLinkActivated(QString)));
connect(&dialog, SIGNAL(downloadRequest(QString)), &m_OrganizerCore, SLOT(downloadRequestedNXM(QString)));
connect(&dialog, SIGNAL(modOpen(QString, int)), this, SLOT(displayModInformation(QString, int)), Qt::QueuedConnection);
- connect(&dialog, SIGNAL(modOpenNext()), this, SLOT(modOpenNext()), Qt::QueuedConnection);
- connect(&dialog, SIGNAL(modOpenPrev()), this, SLOT(modOpenPrev()), Qt::QueuedConnection);
+ connect(&dialog, SIGNAL(modOpenNext(int)), this, SLOT(modOpenNext(int)), Qt::QueuedConnection);
+ connect(&dialog, SIGNAL(modOpenPrev(int)), this, SLOT(modOpenPrev(int)), Qt::QueuedConnection);
connect(&dialog, SIGNAL(originModified(int)), this, SLOT(originModified(int)));
connect(&dialog, SIGNAL(endorseMod(ModInfo::Ptr)), this, SLOT(endorseMod(ModInfo::Ptr)));
@@ -2526,7 +2526,7 @@ void MainWindow::setWindowEnabled(bool enabled) }
-void MainWindow::modOpenNext()
+void MainWindow::modOpenNext(int tab)
{
QModelIndex index = m_ModListSortProxy->mapFromSource(m_OrganizerCore.modList()->index(m_ContextRow, 0));
index = m_ModListSortProxy->index((index.row() + 1) % m_ModListSortProxy->rowCount(), 0);
@@ -2537,13 +2537,13 @@ void MainWindow::modOpenNext() if ((std::find(flags.begin(), flags.end(), ModInfo::FLAG_OVERWRITE) != flags.end()) ||
(std::find(flags.begin(), flags.end(), ModInfo::FLAG_BACKUP) != flags.end())) {
// skip overwrite and backups
- modOpenNext();
+ modOpenNext(tab);
} else {
- displayModInformation(m_ContextRow);
+ displayModInformation(m_ContextRow,tab);
}
}
-void MainWindow::modOpenPrev()
+void MainWindow::modOpenPrev(int tab)
{
QModelIndex index = m_ModListSortProxy->mapFromSource(m_OrganizerCore.modList()->index(m_ContextRow, 0));
int row = index.row() - 1;
@@ -2557,9 +2557,9 @@ void MainWindow::modOpenPrev() if ((std::find(flags.begin(), flags.end(), ModInfo::FLAG_OVERWRITE) != flags.end()) ||
(std::find(flags.begin(), flags.end(), ModInfo::FLAG_BACKUP) != flags.end())) {
// skip overwrite and backups
- modOpenPrev();
+ modOpenPrev(tab);
} else {
- displayModInformation(m_ContextRow);
+ displayModInformation(m_ContextRow,tab);
}
}
|
