Fix #113885 : Drag and Drop colors misses an undo push
Since the operator can also act on e.g theme colors [and changes to these shouldnt send undo pushes], dont do a general `OPTYPE_UNDO`, but instead be a bit more specific and only do an undo push for buttons with `UI_BUT_UNDO`. Probably good for LTS. Pull Request: https://projects.blender.org/blender/blender/pulls/113887
This commit is contained in:
committed by
Philipp Oeser
parent
e7abced86e
commit
cdd122cd74
@@ -58,6 +58,7 @@
|
||||
|
||||
#include "ED_object.hh"
|
||||
#include "ED_paint.hh"
|
||||
#include "ED_undo.hh"
|
||||
|
||||
/* for Copy As Driver */
|
||||
#include "ED_keyframing.hh"
|
||||
@@ -2316,6 +2317,10 @@ static int drop_color_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
RNA_property_float_set_array(&but->rnapoin, but->rnaprop, color);
|
||||
RNA_property_update(C, &but->rnapoin, but->rnaprop);
|
||||
}
|
||||
|
||||
if (UI_but_flag_is_set(but, UI_BUT_UNDO)) {
|
||||
ED_undo_push(C, RNA_property_ui_name(but->rnaprop));
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (gamma) {
|
||||
|
||||
Reference in New Issue
Block a user