Qt: Use file selector in Set Location if session is local (#502)

It's the only place where Session::isServer() is used to decide if
a file selector should be used, or a text box. Session::isLocal()
is used everywhere else.

Co-authored-by: dubhater <cantabile.desu@gmail.com>
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
This commit is contained in:
dubhater
2021-08-07 17:08:37 +03:00
committed by GitHub
parent 6f76d8fae7
commit f804043b85

View File

@@ -46,7 +46,7 @@ RelocateDialog::RelocateDialog(Session& session, TorrentModel const& model, torr
}
else if (path != tor->getPath())
{
if (session_.isServer())
if (session_.isLocal())
{
path = QDir::homePath();
}
@@ -59,7 +59,7 @@ RelocateDialog::RelocateDialog(Session& session, TorrentModel const& model, torr
}
}
if (session_.isServer())
if (session_.isLocal())
{
ui_.newLocationStack->setCurrentWidget(ui_.newLocationButton);
ui_.newLocationButton->setMode(PathButton::DirectoryMode);