Cleanup: Remove unused operator name storage in UI lists

This commit is contained in:
Julian Eisel 2022-07-11 11:14:21 +02:00
parent 7357176b57
commit da101118d4
2 changed files with 3 additions and 9 deletions

View File

@ -9487,7 +9487,7 @@ static int ui_list_activate_hovered_row(bContext *C,
}
/* Simulate click on listrow button itself (which may be overlapped by another button). Also
* calls the custom activate operator (ui_list->custom_activate_opname). */
* calls the custom activate operator (#uiListDyn::custom_activate_optype). */
UI_but_execute(C, region, listrow);
((uiList *)ui_list)->dyn_data->custom_activate_optype = custom_activate_optype;
@ -9558,13 +9558,13 @@ static void ui_list_activate_row_from_index(
uiBut *new_active_row = ui_list_row_find_from_index(region, index, listbox);
if (new_active_row) {
/* Preferred way to update the active item, also calls the custom activate operator
* (#uiList.custom_activate_opname). */
* (#uiListDyn::custom_activate_optype). */
UI_but_execute(C, region, new_active_row);
}
else {
/* A bit ugly, set the active index in RNA directly. That's because a button that's
* scrolled away in the list box isn't created at all.
* The custom activate operator (#uiList.custom_activate_opname) is not called in this case
* The custom activate operator (#uiListDyn::custom_activate_optype) is not called in this case
* (which may need the row button context). */
RNA_property_int_set(&listbox->rnapoin, listbox->rnaprop, index);
RNA_property_update(C, &listbox->rnapoin, listbox->rnaprop);

View File

@ -305,12 +305,6 @@ typedef struct uiList { /* some list UI data need to be saved in file */
int filter_flag;
int filter_sort_flag;
/** Operator executed when activating an item. */
const char *custom_activate_opname;
/** Operator executed when dragging an item (item gets activated too, without running
* custom_activate_opname above). */
const char *custom_drag_opname;
/* Custom sub-classes properties. */
IDProperty *properties;