diff -r 627c4a0fd0e7 -r c3690ec91ef8 src/hbwidgets/widgets/hbcombobox_p.cpp --- a/src/hbwidgets/widgets/hbcombobox_p.cpp Fri Jun 11 13:58:22 2010 +0300 +++ b/src/hbwidgets/widgets/hbcombobox_p.cpp Wed Jun 23 18:33:25 2010 +0300 @@ -77,11 +77,14 @@ if( mButtonTouchAreaItem ) { static_cast( mButtonTouchAreaItem )->removeEventFilter( q ); } - if ( !q->scene( ) || !q->scene( )->property( "destructed" ).isValid( ) ) { - if( mDropDown ) { - delete mDropDown; - mDropDown = 0; - } + + if ( !mDropDown ) { + return; + } + + if ( !mDropDown->scene() || !mDropDown->scene( )->property( "destructed" ).isValid( ) ) { + delete mDropDown; + mDropDown = 0; } } @@ -131,7 +134,6 @@ HbWidgetFeedback::triggered( q, Hb::InstantReleased ); } - q->setProperty( "state", "normal" ); } void HbComboBoxPrivate::touchAreaClicked( ) @@ -140,6 +142,7 @@ if ( mModel && mModel->rowCount( ) ) { addDropDownToScene( ); mDropDown->setVisible( true ); + q->setProperty( "state", "latched" ); if( !mDropDown->mList ) { mDropDown->createList( ); mDropDown->mList->setModel( mModel ); @@ -203,10 +206,12 @@ void HbComboBoxPrivate::createDropDown( ) { + Q_Q ( HbComboBox ); if( !mIsDorpdownCreated ) { mDropDown = new HbComboDropDown( this ); mIsDorpdownCreated = true; mDropDown->setVisible( false ); + q->setProperty( "state", "normal" ); } } @@ -407,6 +412,7 @@ } if ( mDropDown->isVisible( ) ) { mDropDown->setVisible( false ); + q->setProperty( "state", "normal" ); } currentIndexChanged( mCurrentIndex ); } @@ -447,6 +453,7 @@ createDropDown( ); if ( mDropDown->isVisible( ) ) { mDropDown->setVisible( false ); + q->setProperty( "state", "normal" ); } q->clear( ); delete mModel;