[vlmc-devel] commit: PathWidget: Don't blank the field when the dialog is cancelled. ( =?UTF-8?Q?Hugo=20Beauz=C3=A9e=2DLuyssen?==?UTF-8?Q?=20?=)

git at videolan.org git at videolan.org
Sun Dec 5 21:29:13 CET 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Dec  5 19:34:54 2010 +0100| [faa70346156b05b9f21b059f7f36ec4f3f8ef474] | committer: Hugo Beauzée-Luyssen 

PathWidget: Don't blank the field when the dialog is cancelled.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=faa70346156b05b9f21b059f7f36ec4f3f8ef474
---

 src/Gui/settings/PathWidget.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/Gui/settings/PathWidget.cpp b/src/Gui/settings/PathWidget.cpp
index 826b351..021c26c 100644
--- a/src/Gui/settings/PathWidget.cpp
+++ b/src/Gui/settings/PathWidget.cpp
@@ -71,5 +71,6 @@ PathWidget::selectPathButtonPressed()
 {
     QString path = QFileDialog::getExistingDirectory( NULL, tr( "Select a path" ),
                                                       m_setting->get().toString() );
-    m_lineEdit->setText( path );
+    if ( path.length() > 0 )
+        m_lineEdit->setText( path );
 }



More information about the Vlmc-devel mailing list