mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Fix unable to control add torrent dialogs when opened simultaneously
This commit is contained in:
parent
03fdc0e1c4
commit
dc9d0ed76f
@ -93,6 +93,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
|
|||||||
// TODO: set dialog file properties using m_torrentParams.filePriorities
|
// TODO: set dialog file properties using m_torrentParams.filePriorities
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
||||||
m_ui->lblMetaLoading->setVisible(false);
|
m_ui->lblMetaLoading->setVisible(false);
|
||||||
m_ui->progMetaLoading->setVisible(false);
|
m_ui->progMetaLoading->setVisible(false);
|
||||||
|
|
||||||
@ -100,10 +101,6 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
|
|||||||
m_ui->savePath->setDialogCaption(tr("Choose save path"));
|
m_ui->savePath->setDialogCaption(tr("Choose save path"));
|
||||||
m_ui->savePath->setMaxVisibleItems(20);
|
m_ui->savePath->setMaxVisibleItems(20);
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
setModal(true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const auto *session = BitTorrent::Session::instance();
|
const auto *session = BitTorrent::Session::instance();
|
||||||
|
|
||||||
if (m_torrentParams.addPaused == TriStateBool::True)
|
if (m_torrentParams.addPaused == TriStateBool::True)
|
||||||
@ -241,7 +238,7 @@ void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorre
|
|||||||
: dlg->loadTorrentFile(source);
|
: dlg->loadTorrentFile(source);
|
||||||
|
|
||||||
if (isLoaded)
|
if (isLoaded)
|
||||||
dlg->open();
|
dlg->QDialog::show();
|
||||||
else
|
else
|
||||||
delete dlg;
|
delete dlg;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user