From 59e6a4298d59081ed4ed00f4c2f925fb54607e62 Mon Sep 17 00:00:00 2001 From: Brian Kendall Date: Tue, 25 Apr 2017 13:34:06 -0400 Subject: [PATCH] Fixed macOS-specific bug in AddNewTorrentDialog Because AddNewTorrentDialog is a sheet in macOS, repositioning it causes bad things to happen, particularly if the main dialog is on a secondary monitor. --- src/gui/addnewtorrentdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/addnewtorrentdialog.cpp b/src/gui/addnewtorrentdialog.cpp index b33814550..5173c8c0b 100644 --- a/src/gui/addnewtorrentdialog.cpp +++ b/src/gui/addnewtorrentdialog.cpp @@ -553,6 +553,10 @@ void AddNewTorrentDialog::renameSelectedFile() void AddNewTorrentDialog::setdialogPosition() { + // In macOS, AddNewTorrentDialog is a sheet, not a window. Moving it + // causes very bad things to happen, especially if AddNewTorrentDialog is + // on a secondary monitor. +#ifndef Q_OS_MAC qApp->processEvents(); QPoint center(Utils::Misc::screenCenter(this)); // Adjust y @@ -566,6 +570,7 @@ void AddNewTorrentDialog::setdialogPosition() center.setY(0); } move(center); +#endif } void AddNewTorrentDialog::populateSavePathComboBox()