Fix #94129: Unable to remove added keying set from context menu

Mistake in (7-year-old) f6c09eadf0.

The operator was just cancelled if the right button was found, instead
it should only cancel if the button is _not_ found.

Pull Request: https://projects.blender.org/blender/blender/pulls/111373
This commit is contained in:
Philipp Oeser 2023-08-23 09:39:38 +02:00
parent 5eafbc7c6e
commit a423ebad48

View file

@ -383,8 +383,7 @@ static int remove_keyingset_button_exec(bContext *C, wmOperator *op)
bool changed = false;
int index = 0;
/* try to add to keyingset using property retrieved from UI */
if (UI_context_active_but_prop_get(C, &ptr, &prop, &index)) {
if (!UI_context_active_but_prop_get(C, &ptr, &prop, &index)) {
/* pass event on if no active button found */
return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
}