Commit 008c3144 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: fix Windows open dialog issue on paste

Close #6242
(cherry picked from commit 527d35074fbd64768eab60b23797aac9fc589019)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 9cba28d8
...@@ -498,10 +498,11 @@ void DiscOpenPanel::updateMRL() ...@@ -498,10 +498,11 @@ void DiscOpenPanel::updateMRL()
QString discPath; QString discPath;
QStringList fileList; QStringList fileList;
if( ui.deviceCombo->itemData( ui.deviceCombo->currentIndex() ) != QVariant::Invalid ) discPath = ui.deviceCombo->currentText();
discPath = ui.deviceCombo->itemData( ui.deviceCombo->currentIndex() ).toString();
else int tmp = ui.deviceCombo->findText( discPath );
discPath = ui.deviceCombo->currentText(); if( tmp != -1 && ui.deviceCombo->itemData( tmp ) != QVariant::Invalid )
discPath = ui.deviceCombo->itemData( tmp ).toString();
/* MRL scheme */ /* MRL scheme */
const char *scheme; const char *scheme;
...@@ -574,7 +575,6 @@ void DiscOpenPanel::browseDevice() ...@@ -574,7 +575,6 @@ void DiscOpenPanel::browseDevice()
{ {
ui.deviceCombo->addItem( toNativeSepNoSlash( dir ) ); ui.deviceCombo->addItem( toNativeSepNoSlash( dir ) );
ui.deviceCombo->setCurrentIndex( ui.deviceCombo->findText( toNativeSepNoSlash( dir ) ) ); ui.deviceCombo->setCurrentIndex( ui.deviceCombo->findText( toNativeSepNoSlash( dir ) ) );
updateMRL();
} }
updateMRL(); updateMRL();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment