mirror of
https://github.com/transmission/transmission
synced 2025-01-31 11:23:40 +00:00
Fix directory name display in relocate dialog
This commit is contained in:
parent
8a4f8b9e15
commit
e9394e2f9b
1 changed files with 3 additions and 2 deletions
|
@ -32,13 +32,14 @@ RelocateDialog::onFileSelected (const QString& path)
|
||||||
myPath = path;
|
myPath = path;
|
||||||
|
|
||||||
const QFileInfo pathInfo (path);
|
const QFileInfo pathInfo (path);
|
||||||
|
const QString absolutePath = pathInfo.absoluteFilePath ();
|
||||||
const QFileIconProvider iconProvider;
|
const QFileIconProvider iconProvider;
|
||||||
|
|
||||||
ui.newLocationButton->setIcon (mySession.isLocal () ?
|
ui.newLocationButton->setIcon (mySession.isLocal () ?
|
||||||
iconProvider.icon (pathInfo) :
|
iconProvider.icon (pathInfo) :
|
||||||
iconProvider.icon (QFileIconProvider::Folder));
|
iconProvider.icon (QFileIconProvider::Folder));
|
||||||
ui.newLocationButton->setText (pathInfo.baseName ());
|
ui.newLocationButton->setText (pathInfo.fileName ().isEmpty () ? absolutePath : pathInfo.fileName ());
|
||||||
ui.newLocationButton->setToolTip (path);
|
ui.newLocationButton->setToolTip (absolutePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue