]> git.sesse.net Git - kdenlive/commitdiff
Fix selection issue in effect stack when deleting last effect
authorTill Theato <root@ttill.de>
Fri, 21 Jan 2011 22:48:16 +0000 (22:48 +0000)
committerTill Theato <root@ttill.de>
Fri, 21 Jan 2011 22:48:16 +0000 (22:48 +0000)
svn path=/trunk/kdenlive/; revision=5340

src/effectstackview.cpp

index 0908fea54ef122ac898cf82343183872f0a68f34..cb0851b8d59d626a51c3a83b70cbd84ba1066e8e 100644 (file)
@@ -294,8 +294,7 @@ void EffectStackView::setupListView(int ix)
         m_ui.buttonShowComments->setEnabled(false);
         m_ui.labelComment->setHidden(true);
     } else {
-        qMin(ix, 0);
-        qMax(ix, m_ui.effectlist->count() - 1);
+        ix = qBound(0, ix, m_ui.effectlist->count() - 1);
         m_ui.effectlist->setCurrentRow(ix);
         m_ui.checkAll->setEnabled(true);
     }