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:
authorCampbell Barton <ideasman42@gmail.com>2019-09-30 18:36:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-30 18:57:51 +0300
commit68c2f7a2d06fa1146f862e4f0959d9aeb60d7456 (patch)
treec95daab71eb127590af9ddc04070d57edb2cecfb /source/blender/editors/interface/interface_query.c
parent6a6ac502f2612f37c294692cee87ccf6875b2eb5 (diff)
Revert "Fix T58683: Reload Scripts breaks toolbar button formatting."
This reverts commit ba90d2efa58fe23a87f98e014bcc02ea951a6a49. This can be resolved without adding a boolean to all operator types to check if it's "WM_OT_tool_set_by_id".
Diffstat (limited to 'source/blender/editors/interface/interface_query.c')
-rw-r--r--source/blender/editors/interface/interface_query.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_query.c b/source/blender/editors/interface/interface_query.c
index e08b13f65d4..457d01c5dc8 100644
--- a/source/blender/editors/interface/interface_query.c
+++ b/source/blender/editors/interface/interface_query.c
@@ -139,7 +139,17 @@ bool ui_but_has_array_value(const uiBut *but)
bool UI_but_is_tool(const uiBut *but)
{
- return but->optype && but->optype->is_tool_button;
+ /* very evil! */
+ if (but->optype != NULL) {
+ static wmOperatorType *ot = NULL;
+ if (ot == NULL) {
+ ot = WM_operatortype_find("WM_OT_tool_set_by_id", false);
+ }
+ if (but->optype == ot) {
+ return true;
+ }
+ }
+ return false;
}
bool UI_but_has_tooltip_label(const uiBut *but)