diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index f7cca785..f6ec4f40 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -338,7 +338,7 @@ MainWindow::MainWindow(QSettings &initSettings
linkMenu->addAction(QIcon(":/MO/gui/link"), tr("Start Menu"), this, SLOT(linkMenu()));
ui->linkButton->setMenu(linkMenu);
- ui->listOptionsBtn->setMenu(modListContextMenu());
+ ui->listOptionsBtn->setMenu(modListContextMenu(ui->listOptionsBtn));
connect(ui->listOptionsBtn, SIGNAL(pressed()), this, SLOT(on_listOptionsBtn_pressed()));
ui->openFolderMenu->setMenu(openFolderMenu());
@@ -4375,9 +4375,9 @@ QMenu *MainWindow::openFolderMenu()
return FolderMenu;
}
-QMenu *MainWindow::modListContextMenu()
+QMenu *MainWindow::modListContextMenu(QWidget *parent)
{
- QMenu *menu = new QMenu(this);
+ QMenu *menu = new QMenu(parent);
menu->addAction(tr("Install Mod..."), this, SLOT(installMod_clicked()));
menu->addAction(tr("Create empty mod"), this, SLOT(createEmptyMod_clicked()));
@@ -4404,7 +4404,7 @@ void MainWindow::addModSendToContextMenu(QMenu *menu)
if (m_ModListSortProxy->sortColumn() != ModList::COL_PRIORITY)
return;
- QMenu *sub_menu = new QMenu(this);
+ QMenu *sub_menu = new QMenu(menu);
sub_menu->setTitle(tr("Send to"));
sub_menu->addAction(tr("Top"), this, SLOT(sendSelectedModsToTop_clicked()));
sub_menu->addAction(tr("Bottom"), this, SLOT(sendSelectedModsToBottom_clicked()));
@@ -4439,12 +4439,12 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos)
m_ContextRow = m_ContextIdx.row();
QMenu *menu = nullptr;
- QMenu *allMods = modListContextMenu();
if (m_ContextRow == -1) {
// no selection
- menu = allMods;
+ menu = modListContextMenu(this);
} else {
menu = new QMenu(this);
+ QMenu *allMods = modListContextMenu(menu);
allMods->setTitle(tr("All Mods"));
menu->addMenu(allMods);
menu->addSeparator();
@@ -4463,11 +4463,11 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos)
menu->addAction(tr("Remove Backup..."), this, SLOT(removeMod_clicked()));
} else if (std::find(flags.begin(), flags.end(), ModInfo::FLAG_SEPARATOR) != flags.end()){
menu->addSeparator();
- QMenu *addRemoveCategoriesMenu = new QMenu(tr("Change Categories"));
+ QMenu *addRemoveCategoriesMenu = new QMenu(tr("Change Categories"), menu);
populateMenuCategories(addRemoveCategoriesMenu, 0);
connect(addRemoveCategoriesMenu, SIGNAL(aboutToHide()), this, SLOT(addRemoveCategories_MenuHandler()));
addMenuAsPushButton(menu, addRemoveCategoriesMenu);
- QMenu *primaryCategoryMenu = new QMenu(tr("Primary Category"));
+ QMenu *primaryCategoryMenu = new QMenu(tr("Primary Category"), menu);
connect(primaryCategoryMenu, SIGNAL(aboutToShow()), this, SLOT(addPrimaryCategoryCandidates()));
addMenuAsPushButton(menu, primaryCategoryMenu);
menu->addSeparator();
@@ -4482,12 +4482,12 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos)
} else if (std::find(flags.begin(), flags.end(), ModInfo::FLAG_FOREIGN) != flags.end()) {
addModSendToContextMenu(menu);
} else {
- QMenu *addRemoveCategoriesMenu = new QMenu(tr("Change Categories"));
+ QMenu *addRemoveCategoriesMenu = new QMenu(tr("Change Categories"), menu);
populateMenuCategories(addRemoveCategoriesMenu, 0);
connect(addRemoveCategoriesMenu, SIGNAL(aboutToHide()), this, SLOT(addRemoveCategories_MenuHandler()));
addMenuAsPushButton(menu, addRemoveCategoriesMenu);
- QMenu *primaryCategoryMenu = new QMenu(tr("Primary Category"));
+ QMenu *primaryCategoryMenu = new QMenu(tr("Primary Category"), menu);
connect(primaryCategoryMenu, SIGNAL(aboutToShow()), this, SLOT(addPrimaryCategoryCandidates()));
addMenuAsPushButton(menu, primaryCategoryMenu);
@@ -4568,6 +4568,7 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos)
}
menu->exec(modList->mapToGlobal(pos));
+ delete menu;
} catch (const std::exception &e) {
reportError(tr("Exception: ").arg(e.what()));
} catch (...) {
@@ -4920,7 +4921,7 @@ void MainWindow::languageChange(const QString &newLanguage)
updateDownloadView();
updateProblemsButton();
- ui->listOptionsBtn->setMenu(modListContextMenu());
+ ui->listOptionsBtn->setMenu(modListContextMenu(ui->listOptionsBtn));
ui->openFolderMenu->setMenu(openFolderMenu());
}
diff --git a/src/mainwindow.h b/src/mainwindow.h
index e919ed2c..6e2f247d 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -281,7 +281,7 @@ private:
bool createBackup(const QString &filePath, const QDateTime &time);
QString queryRestore(const QString &filePath);
- QMenu *modListContextMenu();
+ QMenu *modListContextMenu(QWidget *parent);
void addModSendToContextMenu(QMenu *menu);
void addPluginSendToContextMenu(QMenu *menu);
diff --git a/src/organizer_en.ts b/src/organizer_en.ts
index ced5b0cb..dd4d365e 100644
--- a/src/organizer_en.ts
+++ b/src/organizer_en.ts
@@ -1732,7 +1732,7 @@ p, li { white-space: pre-wrap; }
-
+
Refresh
@@ -1927,7 +1927,7 @@ p, li { white-space: pre-wrap; }
-
+
Update
@@ -1969,7 +1969,7 @@ Right now this has very limited functionality
-
+
Endorse Mod Organizer
@@ -2269,8 +2269,8 @@ Error: %1
-
-
+
+
failed to rename "%1" to "%2"
@@ -2278,7 +2278,7 @@ Error: %1
-
+
Confirm
@@ -2432,7 +2432,7 @@ Please enter a name:
-
+
Are you sure?
@@ -2460,7 +2460,7 @@ This function will guess the versioning scheme under the assumption that the ins
-
+
Sorry
@@ -2769,13 +2769,13 @@ You can also use online editors and converters instead.
-
+
Enable selected
-
+
Disable selected
@@ -2835,34 +2835,34 @@ You can also use online editors and converters instead.
-
-
+
+
Exception:
-
-
+
+
Unknown exception
-
+
<All>
-
+
<Multiple>
-
+
%1 more
-
+
Are you sure you want to remove the following %n save(s)?<br><ul>%1</ul><br>Removed saves will be sent to the Recycle Bin.
@@ -2870,12 +2870,12 @@ You can also use online editors and converters instead.
-
+
Enable Mods...
-
+
Delete %n save(s)
@@ -2883,22 +2883,22 @@ You can also use online editors and converters instead.
-
+
failed to remove %1
-
+
failed to create %1
-
+
Restarting MO
-
+
Changing the managed game directory requires restarting MO.
Any pending downloads will be paused.
@@ -2906,335 +2906,335 @@ Click OK to restart MO now.
-
+
Can't change download directory while downloads are in progress!
-
+
failed to write to file %1
-
+
%1 written
-
+
Select binary
-
+
Binary
-
+
Enter Name
-
+
Please enter a name for the executable
-
+
Not an executable
-
+
This is not a recognized executable.
-
-
+
+
Replace file?
-
+
There already is a hidden version of this file. Replace it?
-
-
+
+
File operation failed
-
-
+
+
Failed to remove "%1". Maybe you lack the required file permissions?
-
+
There already is a visible version of this file. Replace it?
-
-
+
+
Set Priority
-
+
Set the priority of the selected plugins
-
+
file not found: %1
-
+
failed to generate preview for %1
-
+
Sorry, can't preview anything. This function currently does not support extracting from bsas.
-
+
Update available
-
+
Open/Execute
-
+
Add as Executable
-
+
Preview
-
+
Un-Hide
-
+
Hide
-
+
Write To File...
-
+
Do you want to endorse Mod Organizer on %1 now?
-
+
Thank you!
-
+
Thank you for your endorsement!
-
+
Request to Nexus failed: %1
-
-
+
+
failed to read %1: %2
-
-
+
+
Error
-
+
failed to extract %1 (errorcode %2)
-
+
Extract BSA
-
+
This archive contains invalid hashes. Some files may be broken.
-
+
Extract...
-
+
This will restart MO, continue?
-
+
Edit Categories...
-
+
Deselect filter
-
+
Remove
-
+
Enable all
-
+
Disable all
-
+
Unlock load order
-
+
Lock load order
-
+
Open Origin in Explorer
-
+
Open Origin Info...
-
+
depends on missing "%1"
-
+
incompatible with "%1"
-
+
Please wait while LOOT is running
-
+
loot failed. Exit code was: %1
-
+
failed to start loot
-
+
failed to run loot: %1
-
+
Errors occured
-
+
Backup of load order created
-
+
Choose backup to restore
-
+
No Backups
-
+
There are no backups to restore
-
-
-
- Restore failed
-
-
+ Restore failed
+
+
+
+
+
Failed to restore the backup. Errorcode: %1
-
+
Backup of modlist created
-
+
A file with the same name has already been downloaded. What would you like to do?
-
+
Overwrite
-
+
Rename new file
-
+
Ignore file
-
+
Set the priority of the selected mods
@@ -5649,7 +5649,7 @@ If the folder was still in use, restart MO and try again.
-
+
<Manage...>