mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 09:35:40 +00:00
Merge pull request #808 from CookiePLMonster/fix-properties-dialog
Give GamePropertiesDialog a parent
This commit is contained in:
commit
3d3e552266
|
@ -153,9 +153,9 @@ void GamePropertiesDialog::setupAdditionalUi()
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GamePropertiesDialog::showForEntry(QtHostInterface* host_interface, const GameListEntry* ge)
|
void GamePropertiesDialog::showForEntry(QtHostInterface* host_interface, const GameListEntry* ge, QWidget* parent)
|
||||||
{
|
{
|
||||||
GamePropertiesDialog* gpd = new GamePropertiesDialog(host_interface);
|
GamePropertiesDialog* gpd = new GamePropertiesDialog(host_interface, parent);
|
||||||
gpd->populate(ge);
|
gpd->populate(ge);
|
||||||
gpd->show();
|
gpd->show();
|
||||||
gpd->onResize();
|
gpd->onResize();
|
||||||
|
|
|
@ -17,7 +17,7 @@ public:
|
||||||
GamePropertiesDialog(QtHostInterface* host_interface, QWidget* parent = nullptr);
|
GamePropertiesDialog(QtHostInterface* host_interface, QWidget* parent = nullptr);
|
||||||
~GamePropertiesDialog();
|
~GamePropertiesDialog();
|
||||||
|
|
||||||
static void showForEntry(QtHostInterface* host_interface, const GameListEntry* ge);
|
static void showForEntry(QtHostInterface* host_interface, const GameListEntry* ge, QWidget* parent);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void clear();
|
void clear();
|
||||||
|
|
|
@ -406,7 +406,7 @@ void MainWindow::onGameListContextMenuRequested(const QPoint& point, const GameL
|
||||||
if (entry)
|
if (entry)
|
||||||
{
|
{
|
||||||
connect(menu.addAction(tr("Properties...")), &QAction::triggered,
|
connect(menu.addAction(tr("Properties...")), &QAction::triggered,
|
||||||
[this, entry]() { GamePropertiesDialog::showForEntry(m_host_interface, entry); });
|
[this, entry]() { GamePropertiesDialog::showForEntry(m_host_interface, entry, this); });
|
||||||
|
|
||||||
connect(menu.addAction(tr("Open Containing Directory...")), &QAction::triggered, [this, entry]() {
|
connect(menu.addAction(tr("Open Containing Directory...")), &QAction::triggered, [this, entry]() {
|
||||||
const QFileInfo fi(QString::fromStdString(entry->path));
|
const QFileInfo fi(QString::fromStdString(entry->path));
|
||||||
|
|
Loading…
Reference in a new issue