[Bf-blender-cvs] [da101118d4a] master: Cleanup: Remove unused operator name storage in UI lists

Julian Eisel noreply at git.blender.org
Mon Jul 11 11:17:17 CEST 2022


Commit: da101118d4a5b1fe39181c4caaf78ccd4d715239
Author: Julian Eisel
Date:   Mon Jul 11 11:14:21 2022 +0200
Branches: master
https://developer.blender.org/rBda101118d4a5b1fe39181c4caaf78ccd4d715239

Cleanup: Remove unused operator name storage in UI lists

===================================================================

M	source/blender/editors/interface/interface_handlers.c
M	source/blender/makesdna/DNA_screen_types.h

===================================================================

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 7c00c4f1875..21fd14b86b7 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -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);
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 8560f8a454e..e9178c0cbf5 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -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;



More information about the Bf-blender-cvs mailing list