Fix T93629: Reset to defaults undoes all steps when applied twice

Reset Defaults left the undo stack in an invalid state,
with the active undo step left at the previous state then it should
have been.

Now the buttons own undo logic is used to perform undo pushes.
This commit is contained in:
2022-02-22 16:36:59 +11:00
parent 75be58c63d
commit c5b66560de
3 changed files with 25 additions and 5 deletions

View File

@@ -2916,7 +2916,7 @@ uiBut *UI_context_active_but_prop_get(const struct bContext *C,
struct PointerRNA *r_ptr,
struct PropertyRNA **r_prop,
int *r_index);
void UI_context_active_but_prop_handle(struct bContext *C);
void UI_context_active_but_prop_handle(struct bContext *C, bool handle_undo);
void UI_context_active_but_clear(struct bContext *C, struct wmWindow *win, struct ARegion *region);
struct wmOperator *UI_context_active_operator_get(const struct bContext *C);