mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
Qt: fix playlist title when adding a folder with one item
This commit is contained in:
parent
faaf84aef3
commit
230787808c
@ -306,11 +306,14 @@ void MainWindow::addFilesToPlaylist(QStringList files)
|
||||
|
||||
fileInfo = fileName;
|
||||
|
||||
if (files.count() == 1 && list.count() == 1 && i == 0)
|
||||
/* Make sure we're looking at a user-specified field and not just "<multiple>"
|
||||
* in case it was a folder with one file in it */
|
||||
if (files.count() == 1 && list.count() == 1 && i == 0 && playlistDialog->nameFieldEnabled())
|
||||
{
|
||||
fileBaseNameArray = selectedName.toUtf8();
|
||||
pathArray = QDir::toNativeSeparators(selectedPath).toUtf8();
|
||||
}
|
||||
/* Otherwise just use the file name itself (minus extension) for the playlist entry title */
|
||||
else
|
||||
{
|
||||
fileBaseNameArray = fileInfo.completeBaseName().toUtf8();
|
||||
|
@ -182,6 +182,11 @@ void PlaylistEntryDialog::loadPlaylistOptions()
|
||||
}
|
||||
}
|
||||
|
||||
bool PlaylistEntryDialog::nameFieldEnabled()
|
||||
{
|
||||
return m_nameLineEdit->isEnabled();
|
||||
}
|
||||
|
||||
void PlaylistEntryDialog::setEntryValues(const QHash<QString, QString> &contentHash)
|
||||
{
|
||||
QString db;
|
||||
|
@ -20,6 +20,7 @@ public:
|
||||
const QString getSelectedPath();
|
||||
const QStringList getSelectedExtensions();
|
||||
bool filterInArchive();
|
||||
bool nameFieldEnabled();
|
||||
void setEntryValues(const QHash<QString, QString> &contentHash);
|
||||
public slots:
|
||||
bool showDialog(const QHash<QString, QString> &hash = QHash<QString, QString>());
|
||||
|
Loading…
Reference in New Issue
Block a user