Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2017-12-13 16:59:44 +0300
committerRay Molenkamp <github@lazydodo.com>2017-12-13 17:00:16 +0300
commita6218502240499423d29157d3ca3dcb916909b64 (patch)
tree498267d9dea0f21e04ea6dab14484a9613061159 /source/blender/editors/interface/interface_eyedropper_colorband.c
parent81f135677be419a505a38f5a23354690a75b678b (diff)
Fix T53550: E hotkey not working after the color-band picker commit
Related to D2886, the color-band picker was lacking a poll function.
Diffstat (limited to 'source/blender/editors/interface/interface_eyedropper_colorband.c')
-rw-r--r--source/blender/editors/interface/interface_eyedropper_colorband.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper_colorband.c b/source/blender/editors/interface/interface_eyedropper_colorband.c
index 85339ff0322..b13d552dbeb 100644
--- a/source/blender/editors/interface/interface_eyedropper_colorband.c
+++ b/source/blender/editors/interface/interface_eyedropper_colorband.c
@@ -289,6 +289,13 @@ static int eyedropper_colorband_exec(bContext *C, wmOperator *op)
}
}
+static int eyedropper_colorband_poll(bContext *C)
+{
+ uiBut *but = UI_context_active_but_get(C);
+ return (but && but->type == UI_BTYPE_COLORBAND);
+}
+
+
void UI_OT_eyedropper_colorband(wmOperatorType *ot)
{
/* identifiers */
@@ -301,6 +308,7 @@ void UI_OT_eyedropper_colorband(wmOperatorType *ot)
ot->modal = eyedropper_colorband_modal;
ot->cancel = eyedropper_colorband_cancel;
ot->exec = eyedropper_colorband_exec;
+ ot->poll = eyedropper_colorband_poll;
/* flags */
ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
@@ -320,6 +328,7 @@ void UI_OT_eyedropper_colorband_point(wmOperatorType *ot)
ot->modal = eyedropper_colorband_point_modal;
ot->cancel = eyedropper_colorband_cancel;
ot->exec = eyedropper_colorband_exec;
+ ot->poll = eyedropper_colorband_poll;
/* flags */
ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;