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:
authorJoshua Leung <aligorith@gmail.com>2018-06-11 09:51:15 +0300
committerJoshua Leung <aligorith@gmail.com>2018-06-11 09:55:29 +0300
commit1ff28c2650a9145f0e71b85012e500703669871f (patch)
tree5de2b6b5fa8a81b1e4c8c0d27ce7f5583a334617 /source/blender/editors/space_graph
parent9ab26bec27607fc03600bbbf2cea733ab9cce1cc (diff)
Drivers UI Fix: Use uiLayoutSetContextFromBut() so that operators will work in the panel
This fixes the problem where the "Show in Drivers Editor" button would not actually select and highlight the driver under the mouse. (TODO: The channels still aren't getting selected properly in the channels list, but at least the properties show correctly)
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 706beb9784a..50a7d5618bc 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -1019,6 +1019,12 @@ static void graph_panel_drivers_popover(const bContext *C, Panel *pa)
&ptr, prop, index,
NULL, NULL, &driven, &special);
+ /* Hack: Force all buttons in this panel to be able to know the driver button
+ * this panel is getting spawned from, so that things like the "Open Drivers Editor"
+ * button will work.
+ */
+ uiLayoutSetContextFromBut(layout, but);
+
/* Populate Panel - With a combination of the contents of the Driven and Driver panels */
if (fcu) {
ID *id = ptr.id.data;