[vlc-commits] Qt: fix Windows open dialog issue on paste
Jean-Baptiste Kempf
git at videolan.org
Sun Apr 1 01:32:43 CEST 2012
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 1 00:31:06 2012 +0200| [527d35074fbd64768eab60b23797aac9fc589019] | committer: Jean-Baptiste Kempf
Qt: fix Windows open dialog issue on paste
Close #6242
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=527d35074fbd64768eab60b23797aac9fc589019
---
modules/gui/qt4/components/open_panels.cpp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 7f8e636..7073245 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -497,10 +497,11 @@ void DiscOpenPanel::updateMRL()
QString discPath;
QStringList fileList;
- if( ui.deviceCombo->itemData( ui.deviceCombo->currentIndex() ) != QVariant::Invalid )
- discPath = ui.deviceCombo->itemData( ui.deviceCombo->currentIndex() ).toString();
- else
- discPath = ui.deviceCombo->currentText();
+ discPath = ui.deviceCombo->currentText();
+
+ int tmp = ui.deviceCombo->findText( discPath );
+ if( tmp != -1 && ui.deviceCombo->itemData( tmp ) != QVariant::Invalid )
+ discPath = ui.deviceCombo->itemData( tmp ).toString();
/* MRL scheme */
const char *scheme;
@@ -573,7 +574,6 @@ void DiscOpenPanel::browseDevice()
{
ui.deviceCombo->addItem( toNativeSepNoSlash( dir ) );
ui.deviceCombo->setCurrentIndex( ui.deviceCombo->findText( toNativeSepNoSlash( dir ) ) );
- updateMRL();
}
updateMRL();
More information about the vlc-commits
mailing list