src/hbwidgets/dataform/hbdataformviewitem_p.cpp
changeset 28 b7da29130b0e
parent 23 e6ad4ef83b23
--- a/src/hbwidgets/dataform/hbdataformviewitem_p.cpp	Thu Sep 02 20:44:51 2010 +0300
+++ b/src/hbwidgets/dataform/hbdataformviewitem_p.cpp	Fri Sep 17 08:32:10 2010 +0300
@@ -356,9 +356,9 @@
         mDialog->setDismissPolicy(HbPopup::NoDismiss);
         mDialog->setModal(true);
         mDialog->setContentWidget(mRadioButtonList);   
-        HbAction *ok = new HbAction(hbTrId("txt_common_button_ok"));
+        HbAction *ok = new HbAction(hbTrId("txt_common_button_ok"), mDialog);
         mDialog->addAction(ok);
-        HbAction *cancel = new HbAction(hbTrId("txt_common_button_cancel"));
+        HbAction *cancel = new HbAction(hbTrId("txt_common_button_cancel"), mDialog);
         connect(ok, SIGNAL(triggered()), mDialog,SLOT(accept()));
         mDialog->addAction(cancel);
         mDialog->connect(cancel, SIGNAL(triggered()), mDialog, SLOT(reject()));
@@ -371,7 +371,7 @@
 void HbRadioItem::updateModel( int index )
 {
     mSelected = index;
-    if( index > -1 && mItems.count() < index ) {
+    if( index > -1 && mItems.count() > index ) {
         emit valueChanged(mViewItem->modelIndex(), mItems.at(index));
     }
     // Disconnect modelchanged signal since visualization is already updated by user
@@ -771,6 +771,11 @@
     }
 
     mDescription = description;
+    if(mDescription.isEmpty()) {
+        q->setProperty("hasDescription",false);
+    } else {
+        q->setProperty("hasDescription",true);
+    }
     createPrimitives();
     if ( doRepolish ) {
         q->repolish();
@@ -897,7 +902,7 @@
 void HbDataFormViewItemPrivate::setEnabled(bool enabled)
 {
     Q_Q(HbDataFormViewItem);
-
+    Q_UNUSED(enabled);
     QGraphicsItem::GraphicsItemFlags itemFlags = q->flags();
     Qt::ItemFlags indexFlags = mIndex.flags();
 
@@ -920,12 +925,12 @@
     }
 
     if( mContentWidget ) {
-        mContentWidget->setEnabled(enabled);
+        //mContentWidget->setEnabled(enabled);
         //If slider is disabled then still panning should be possible.
         if( ( mType == HbDataFormModelItem::SliderItem ) ||
             ( mType == HbDataFormModelItem::VolumeSliderItem ) ) {
                 HbSlider *slider = static_cast<HbSlider*>( mContentWidget );
-                if( enabled ) {
+                if( slider && slider->isEnabled() ) {
                     //grab pan gesture
                     slider->primitive((HbStyle::Primitive)HbStylePrivate::P_SliderElement_touchgroove)->toGraphicsObject()->grabGesture(
                         Qt::PanGesture);