mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
add menu option to reload card db (#5196)
This commit is contained in:
parent
c51b54c0c5
commit
3255ed3ffb
2 changed files with 12 additions and 1 deletions
|
|
@ -666,6 +666,7 @@ void MainWindow::retranslateUi()
|
|||
aOpenCustomFolder->setText(tr("Open custom image folder"));
|
||||
aOpenCustomsetsFolder->setText(tr("Open custom sets folder"));
|
||||
aAddCustomSet->setText(tr("Add custom sets/cards"));
|
||||
aReloadCardDatabase->setText(tr("Reload card database"));
|
||||
|
||||
helpMenu->setTitle(tr("&Help"));
|
||||
aAbout->setText(tr("&About Cockatrice"));
|
||||
|
|
@ -714,6 +715,8 @@ void MainWindow::createActions()
|
|||
connect(aOpenCustomsetsFolder, SIGNAL(triggered()), this, SLOT(actOpenCustomsetsFolder()));
|
||||
aAddCustomSet = new QAction(QString(), this);
|
||||
connect(aAddCustomSet, SIGNAL(triggered()), this, SLOT(actAddCustomSet()));
|
||||
aReloadCardDatabase = new QAction(QString(), this);
|
||||
connect(aReloadCardDatabase, SIGNAL(triggered()), this, SLOT(actReloadCardDatabase()));
|
||||
|
||||
aAbout = new QAction(this);
|
||||
connect(aAbout, SIGNAL(triggered()), this, SLOT(actAbout()));
|
||||
|
|
@ -788,6 +791,8 @@ void MainWindow::createMenus()
|
|||
dbMenu->addAction(aOpenCustomFolder);
|
||||
dbMenu->addAction(aOpenCustomsetsFolder);
|
||||
dbMenu->addAction(aAddCustomSet);
|
||||
dbMenu->addSeparator();
|
||||
dbMenu->addAction(aReloadCardDatabase);
|
||||
|
||||
helpMenu = menuBar()->addMenu(QString());
|
||||
helpMenu->addAction(aAbout);
|
||||
|
|
@ -1324,6 +1329,11 @@ int MainWindow::getNextCustomSetPrefix(QDir dataDir)
|
|||
return maxIndex + 1;
|
||||
}
|
||||
|
||||
void MainWindow::actReloadCardDatabase()
|
||||
{
|
||||
const auto reloadOk1 = QtConcurrent::run([] { CardDatabaseManager::getInstance()->loadCardDatabases(); });
|
||||
}
|
||||
|
||||
void MainWindow::actManageSets()
|
||||
{
|
||||
wndSets = new WndSets(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue