Merge branch 'blender-v4.4-release'
This commit is contained in:
@@ -3643,7 +3643,7 @@ static void ui_but_free(const bContext *C, uiBut *but)
|
||||
ui_but_semi_modal_state_free(C, but);
|
||||
}
|
||||
else {
|
||||
MEM_freeN(but->semi_modal_state);
|
||||
ui_but_handle_data_free(&but->semi_modal_state);
|
||||
}
|
||||
}
|
||||
if (but->active) {
|
||||
@@ -3654,7 +3654,7 @@ static void ui_but_free(const bContext *C, uiBut *but)
|
||||
ui_but_active_free(C, but);
|
||||
}
|
||||
else {
|
||||
MEM_freeN(but->active);
|
||||
ui_but_handle_data_free(&but->active);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -574,6 +574,18 @@ static bool but_copypaste_profile_alive = false;
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Struct allocation & freeing
|
||||
* \{ */
|
||||
|
||||
void ui_but_handle_data_free(uiHandleButtonData **data)
|
||||
{
|
||||
MEM_delete(*data);
|
||||
*data = nullptr;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name UI Queries
|
||||
* \{ */
|
||||
@@ -8988,8 +9000,7 @@ static void button_activate_exit(
|
||||
BLI_assert(!but->semi_modal_state || but->semi_modal_state == but->active);
|
||||
but->semi_modal_state = nullptr;
|
||||
/* clean up button */
|
||||
MEM_delete(but->active);
|
||||
but->active = nullptr;
|
||||
ui_but_handle_data_free(&but->active);
|
||||
|
||||
but->flag &= ~(UI_HOVER | UI_SELECT);
|
||||
but->flag |= UI_BUT_LAST_ACTIVE;
|
||||
|
||||
@@ -1178,6 +1178,8 @@ const char *ui_textedit_undo(uiUndoStack_Text *stack, int direction, int *r_curs
|
||||
|
||||
/* interface_handlers.cc */
|
||||
|
||||
void ui_but_handle_data_free(uiHandleButtonData **data);
|
||||
|
||||
void ui_handle_afterfunc_add_operator(wmOperatorType *ot, wmOperatorCallContext opcontext);
|
||||
/**
|
||||
* Assumes event type is MOUSEPAN.
|
||||
|
||||
Reference in New Issue
Block a user