equal
deleted
inserted
replaced
29 #include "hsmenuevent.h" |
29 #include "hsmenuevent.h" |
30 #include "hsmenuitemmodel.h" |
30 #include "hsmenuitemmodel.h" |
31 |
31 |
32 /*! |
32 /*! |
33 \class HsArrangeState |
33 \class HsArrangeState |
34 \ingroup group_hsmenustateplugin |
34 \ingroup group_hsworkerstateplugin |
35 \brief Application Library State. |
35 \brief Application Library State. |
36 State responsible for arrange collection's entries. |
36 State responsible for arrange collection's entries. |
37 */ |
37 */ |
38 |
38 |
39 /*! |
39 /*! |
80 { |
80 { |
81 qDebug("HsArrangeState::save()"); |
81 qDebug("HsArrangeState::save()"); |
82 HSMENUTEST_FUNC_ENTRY("HsArrangeState::save"); |
82 HSMENUTEST_FUNC_ENTRY("HsArrangeState::save"); |
83 |
83 |
84 getArrangedEntriesIds(listWidget); |
84 getArrangedEntriesIds(listWidget); |
85 if (mArrangedCollIdList.count() == mCollIdList.count()) { |
85 if (mArrangedCollIdList != mCollIdList) { |
86 for (int i(0); i < mArrangedCollIdList.count(); i++) { |
86 HsMenuService::organizeCollection( |
87 if (mArrangedCollIdList.at(i) != mCollIdList.at(i)) { |
87 HsMenuService::allCollectionsId(), mArrangedCollIdList); |
88 HsMenuService::organizeCollection( |
|
89 HsMenuService::allCollectionsId(), mArrangedCollIdList); |
|
90 break; |
|
91 } |
|
92 } |
|
93 } |
88 } |
94 |
89 |
95 HSMENUTEST_FUNC_EXIT("HsArrangeState::save"); |
90 HSMENUTEST_FUNC_EXIT("HsArrangeState::save"); |
96 } |
91 } |
97 |
92 |
127 |
122 |
128 |
123 |
129 if (mEntriesList != NULL && mDialog != NULL) { |
124 if (mEntriesList != NULL && mDialog != NULL) { |
130 |
125 |
131 mItemModel = HsMenuService::getAllCollectionsModel(); |
126 mItemModel = HsMenuService::getAllCollectionsModel(); |
|
127 // as we copy the model contents to the list widget |
|
128 // we do not need the model to auto update |
|
129 mItemModel->setAutoUpdate(false); |
132 |
130 |
133 fulfillEntriesList(*mEntriesList); |
131 fulfillEntriesList(*mEntriesList); |
134 |
132 |
135 mEntriesList->scrollTo(mTopModelIndex, |
133 mEntriesList->scrollTo(mTopModelIndex, |
136 HbAbstractItemView::PositionAtTop); |
134 HbAbstractItemView::PositionAtTop); |