[vlc-commits] Qt4: do not delete useful text

Jean-Baptiste Kempf git at videolan.org
Mon Mar 12 19:21:55 CET 2012


vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Mar 12 19:20:17 2012 +0100| [a2a951f3fa1f568bf56ade05e81edcc1a199faab] | committer: Jean-Baptiste Kempf

Qt4: do not delete useful text
(cherry picked from commit c26ef9bc31a6ecd06dd4272e9139e6611e2e1294)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=a2a951f3fa1f568bf56ade05e81edcc1a199faab
---

 modules/gui/qt4/components/preferences_widgets.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp
index d2a771e..4706bf6 100644
--- a/modules/gui/qt4/components/preferences_widgets.cpp
+++ b/modules/gui/qt4/components/preferences_widgets.cpp
@@ -1517,8 +1517,11 @@ bool KeySelectorControl::eventFilter( QObject *obj, QEvent *e )
     }
     else if( keyEv->key() == Qt::Key_Delete )
     {
-        aTable->currentItem()->setText( aTable->currentColumn(), NULL );
-        aTable->currentItem()->setData( aTable->currentColumn(), Qt::UserRole, QVariant() );
+        if( aTable->currentColumn() != 0 )
+        {
+            aTable->currentItem()->setText( aTable->currentColumn(), NULL );
+            aTable->currentItem()->setData( aTable->currentColumn(), Qt::UserRole, QVariant() );
+        }
         return true;
     }
     else



More information about the vlc-commits mailing list