~numerigraphe/openobject-client/6.x-o2m-focus-reset

« back to all changes in this revision

Viewing changes to bin/widget/view/list.py

  • Committer: Numerigraphe - Lionel Sausin
  • Author(s): Chris Biersbach
  • Date: 2012-12-05 13:27:53 UTC
  • Revision ID: ls@numerigraphe.fr-20121205132753-mrzc05t09tay9icl
[FIX] Fix latest improvement in cases where the o2m field has more lines than can be displayed at once

Show diffs side-by-side

added added

removed removed

Lines of Context:
588
588
                        # (cause by view selecting the 1st record, then re-displaying itself,
589
589
                        # then selecting real active record)
590
590
                        self.screen.current_model = current_active_model
591
 
                        self.set_cursor()
 
591
                        if selection.get_mode() == gtk.SELECTION_MULTIPLE:
 
592
                            path_active_model = self.store.on_get_path(current_active_model)
 
593
                            if path_active_model not in paths:
 
594
                                # clicked row is not in active selection,
 
595
                                # select only the current row
 
596
                                selection.select_path(path_active_model)
 
597
                            else:
 
598
                                # keep current rows selected
 
599
                                for path in paths:
 
600
                                    selection.select_path(path)
 
601
                            self.widget_tree.scroll_to_cell(path_active_model)
592
602
 
593
603
            else:
594
604
                # Here it goes for right click