~dandrader/unity8/dragChildWithAltPress

« back to all changes in this revision

Viewing changes to qml/Launcher/Drawer.qml

  • Committer: Bileto Bot
  • Author(s): Michael Zanetti
  • Date: 2017-02-16 13:45:54 UTC
  • mfrom: (2659.6.29 unity8-appdrawer)
  • Revision ID: ci-train-bot@canonical.com-20170216134554-kbvxe07d5hgayc7m
properly invalidate the whole model

this fixes a crash in certain circumstances but makes things slower.
To compensate the slowness, turning off dynamic sorting/filtering
in the topmost proxy models seems to work fine. (LP: #1658190)

Approved by: Lukáš Tinkl, Unity8 CI Bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
                KeyNavigation.down: sections
96
96
 
97
97
                onAccepted: {
98
 
                    if (searchField.displayText != "" && listLoader.item && listLoader.item.currentItem) {
 
98
                    if (searchField.displayText != "" && listLoader.item) {
 
99
                        // In case there is no currentItem (it might have been filtered away) lets reset it to the first item
 
100
                        if (!listLoader.item.currentItem) {
 
101
                            listLoader.item.currentIndex = 0;
 
102
                        }
99
103
                        root.applicationSelected(listLoader.item.getFirstAppId());
100
104
                    }
101
105
                }
238
242
                        source: sortProxyModel
239
243
                        group: AppDrawerProxyModel.GroupByAll
240
244
                        sortBy: AppDrawerProxyModel.SortByUsage
 
245
                        dynamicSortFilter: false
241
246
                    }
242
247
 
243
248
                    delegate: UbuntuShape {
287
292
                        source: sortProxyModel
288
293
                        sortBy: AppDrawerProxyModel.SortByAToZ
289
294
                        group: AppDrawerProxyModel.GroupByAToZ
 
295
                        dynamicSortFilter: false
290
296
                    }
291
297
 
292
298
                    delegate: UbuntuShape {
320
326
                                id: categoryModel
321
327
                                source: sortProxyModel
322
328
                                filterLetter: model.letter
 
329
                                dynamicSortFilter: false
323
330
                            }
324
331
                            delegateWidth: units.gu(8)
325
332
                            delegateHeight: units.gu(10)