~ubuntuone-control-tower/software-center/trunk

« back to all changes in this revision

Viewing changes to softwarecenter/view/availablepane.py

  • Committer: Gary Lasker
  • Date: 2010-06-10 16:00:42 UTC
  • mfrom: (835.1.6 software-center)
  • Revision ID: gary.lasker@canonical.com-20100610160042-vqlpfovf9k7zly8c
* softwarecenter/view/appview.py,
  softwarecenter/view/availablepane.py,
  softwarecenter/view/channelpane.py:
  - fix visual glitch when updating a list view that contains
    a large number of items (LP: #592296)

Show diffs side-by-side

added added

removed removed

Lines of Context:
209
209
    def refresh_apps(self):
210
210
        """refresh the applist and update the navigation bar
211
211
        """
212
 
        #import traceback
213
 
        #print "refresh_apps"
214
 
        #print traceback.print_stack()
215
212
        logging.debug("refresh_apps")
216
213
        # mvo: its important to fist show the subcategories and then
217
214
        #      the new model, otherwise we run into visual lack
226
223
        logging.debug("availablepane query: %s" % query)
227
224
 
228
225
        old_model = self.app_view.get_model()
 
226
        
 
227
        # if a search is not in progress, clear the current model to
 
228
        # display an empty list while the full list is generated; this
 
229
        # prevents a visual glitch when a list is replaced
 
230
        if not self.apps_search_term:
 
231
            self.app_view.clear_model()
 
232
        
229
233
        if old_model is not None:
230
234
            # *ugh* deactivate the old model because otherwise it keeps
231
235
            # getting progress_changed events and eats CPU time until its