mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
Only ever work on QComboBox if the cast has worked
This commit is contained in:
parent
ad54e6919d
commit
9fca19d7ca
@ -640,12 +640,13 @@ Tomahawk::EchonestControl::updateFromComboAndSlider( bool smooth )
|
||||
{
|
||||
m_matchString = combo->currentText();
|
||||
m_matchData = combo->itemData( combo->currentIndex() ).toString();
|
||||
}
|
||||
LabeledSlider* ls = qobject_cast<LabeledSlider*>( m_input.data() );
|
||||
if( ls && ls->slider() )
|
||||
{
|
||||
m_data.first = static_cast< Echonest::DynamicPlaylist::PlaylistParam >( combo->itemData( combo->currentIndex() ).toInt() );
|
||||
m_data.second = ls->slider()->value() / ( smooth ? 10000. : 1.0 );
|
||||
|
||||
LabeledSlider* ls = qobject_cast<LabeledSlider*>( m_input.data() );
|
||||
if( ls && ls->slider() )
|
||||
{
|
||||
m_data.first = static_cast< Echonest::DynamicPlaylist::PlaylistParam >( combo->itemData( combo->currentIndex() ).toInt() );
|
||||
m_data.second = ls->slider()->value() / ( smooth ? 10000. : 1.0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user