[vlc-devel] [PATCH] A mouse click in an empty position clear the selection (see #1956)

Jean-Baptiste Kempf jb at videolan.org
Thu Oct 16 23:40:10 CEST 2008


Hello Ludo,

      Applied, thanks.

On Thu, Oct 16, 2008 at 11:34:35PM +0200, Ludovic Fauvet wrote :
> ---
>  modules/gui/qt4/util/customwidgets.hpp |   12 +++++++++++-
>  1 files changed, 11 insertions(+), 1 deletions(-)
> 
> diff --git a/modules/gui/qt4/util/customwidgets.hpp b/modules/gui/qt4/util/customwidgets.hpp
> index 24bc324..411c33a 100644
> --- a/modules/gui/qt4/util/customwidgets.hpp
> +++ b/modules/gui/qt4/util/customwidgets.hpp
> @@ -75,7 +75,7 @@ public:
>      };
>      virtual ~QVLCTreeView()   {};
>  
> -    void mouseReleaseEvent(QMouseEvent* e )
> +    void mouseReleaseEvent( QMouseEvent* e )
>      {
>          if( e->button() & Qt::RightButton )
>          {
> @@ -84,6 +84,16 @@ public:
>          }
>          QTreeView::mouseReleaseEvent( e );
>      }
> +
> +    void mousePressEvent( QMouseEvent* e )
> +    {
> +        if( e->button() & Qt::LeftButton )
> +        {
> +            if( !indexAt( QPoint( e->x(), e->y() ) ).isValid() )
> +                clearSelection();
> +        }
> +        QTreeView::mousePressEvent( e );
> +    }
>  signals:
>      void rightClicked( QModelIndex, QPoint  );
>  };
> -- 
> 1.5.6.4
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel

-- 
Best Regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/



More information about the vlc-devel mailing list