[vlc-commits] Qt: fix Windows open dialog issue on paste
Jean-Baptiste Kempf
git at videolan.org
Sun Apr 1 01:34:00 CEST 2012
vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 1 00:31:06 2012 +0200| [008c3144f4afb742d2d913f14b7bd270d2af5f6e] | committer: Jean-Baptiste Kempf
Qt: fix Windows open dialog issue on paste
Close #6242
(cherry picked from commit 527d35074fbd64768eab60b23797aac9fc589019)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=008c3144f4afb742d2d913f14b7bd270d2af5f6e
---
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 5dedbdc..117e67a 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -498,10 +498,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;
@@ -574,7 +575,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