Before this commit, clicking on a column head button in the data sheet,
then holding down the right arrow key until the data sheet began to scroll
right would often produce a warning of the form:
** (psppire:16451): WARNING **: Internal button not found
because nothing caused the underlying GtkButton to be instantiated in this
scenario. This commit fixes the problem.
break;
}
column = tmp_list->data;
- if (column->button &&
- column->visible &&
+ if (column->visible &&
pspp_sheet_view_column_can_focus (column))
- {
- pspp_sheet_view_focus_column (tree_view, column,
- clamp_column_visible);
- return TRUE;
+ {
+ pspp_sheet_view_column_set_need_button (column, TRUE);
+ if (column->button)
+ {
+ pspp_sheet_view_focus_column (tree_view, column,
+ clamp_column_visible);
+ return TRUE;
+ }
}
}
return FALSE;