[vlc-devel] commit: qt4: you don't need to sort on invalid index (Ilkka Ollakka )

git version control git at videolan.org
Tue Aug 18 15:17:52 CEST 2009


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Aug 18 16:15:28 2009 +0300| [f3f1ab6d4e9f366b6932d560263603b1bca160a4] | committer: Ilkka Ollakka 

qt4: you don't need to sort on invalid index

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

 .../gui/qt4/components/playlist/playlist_model.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 557e54d..f95a1ac 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -977,14 +977,14 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list )
             menu->addAction( qtr(I_POP_SAVE), this, SLOT( popupSave() ) );
             menu->addSeparator();
             menu->addAction( qtr(I_POP_INFO), this, SLOT( popupInfo() ) );
+            if( node )
+            {
+                menu->addSeparator();
+                menu->addAction( qtr(I_POP_SORT), this, SLOT( popupSort() ) );
+            }
         }
-        if( node )
-        {
-            if( index.isValid() ) menu->addSeparator();
-            menu->addAction( qtr(I_POP_SORT), this, SLOT( popupSort() ) );
-            if( tree )
+        if( node && tree )
                 menu->addAction( qtr(I_POP_ADD), this, SLOT( popupAddNode() ) );
-        }
         if( index.isValid() )
         {
             menu->addSeparator();




More information about the vlc-devel mailing list