From 855180f9053984357054603760aa73bb48f2bf80 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Tue, 1 Nov 2011 19:00:45 -0400 Subject: [PATCH] Fix animations in breadcrumb and remove some dead code --- src/libtomahawk/widgets/Breadcrumb.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/libtomahawk/widgets/Breadcrumb.cpp b/src/libtomahawk/widgets/Breadcrumb.cpp index e93d3b7ab..59dc6cde0 100644 --- a/src/libtomahawk/widgets/Breadcrumb.cpp +++ b/src/libtomahawk/widgets/Breadcrumb.cpp @@ -121,10 +121,10 @@ Breadcrumb::updateButtons( const QModelIndex& updateFrom ) // Animate all buttons except the first if ( m_buttons.count() > 0 ) { - QPropertyAnimation* animation = new QPropertyAnimation( btn, "x" ); + QPropertyAnimation* animation = new QPropertyAnimation( btn, "pos" ); animation->setDuration( 300 ); - animation->setStartValue( m_buttons.last()->pos().x() ); - animation->setEndValue( btn->pos().x() ); + animation->setStartValue( m_buttons.last()->pos()); + animation->setEndValue( btn->pos() ); animation->start( QAbstractAnimation::DeleteWhenStopped ); } @@ -165,11 +165,3 @@ Breadcrumb::breadcrumbComboChanged( const QModelIndex& childSelected ) tDebug() << "Combo changed:" << childSelected.data(); updateButtons( childSelected ); } - - -// void -// Breadcrumb::currentIndexChanged( const QModelIndex& current, const QModelIndex& previous ) -// { -// -// } -//