def _get_selected_indices ( self ):
        sm = self.factory.selection_mode
        if sm == 'rows':
            return self.selected_row_indices

        elif sm == 'row':
            index = self.selected_row_index
            if index >= 0:
                return [ index ]

        elif sm == 'cells':
            return list( set( [ row_col[0] for
                                row_col in self.selected_cell_indices ] ) )

        elif sm == 'cell':
            index = self.selected_cell_index[0]
            if index >= 0:
                return [ index ]

        return []
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/table_editor.py/TableEditor._get_selected_indices/original