Skip to content

Commit

Permalink
Only set _is_checked if the model has a selected column
Browse files Browse the repository at this point in the history
This was being maskareted before when we assumed that the column idx 0
was the selected one, but now when we don't have a selected column,
`selected_column_idx` will be `None`
  • Loading branch information
bellini666 committed Jul 20, 2015
1 parent 1ccbf81 commit 304a3c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions datagrid_gtk3/ui/grid.py
Expand Up @@ -1377,8 +1377,9 @@ def do_apply_attributes(self, model, iter_, *args):
"""
# For some reason, can't use super here
Gtk.CellAreaBox.do_apply_attributes(self, model, iter_, *args)
self._is_checked = model.get_value(
iter_, model.data_source.selected_column_idx)
if model.data_source.selected_column_idx:
self._is_checked = model.get_value(
iter_, model.data_source.selected_column_idx)


class DataGridIconView(Gtk.IconView):
Expand Down

0 comments on commit 304a3c3

Please sign in to comment.