Browse Source

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.
adaptive-webui-19844
Brian Kendall 8 years ago
parent
commit
59e6a4298d
  1. 5
      src/gui/addnewtorrentdialog.cpp

5
src/gui/addnewtorrentdialog.cpp

@ -553,6 +553,10 @@ void AddNewTorrentDialog::renameSelectedFile() @@ -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() @@ -566,6 +570,7 @@ void AddNewTorrentDialog::setdialogPosition()
center.setY(0);
}
move(center);
#endif
}
void AddNewTorrentDialog::populateSavePathComboBox()

Loading…
Cancel
Save