mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 00:56:33 +01:00
Fix shortcut display in editor tooltips #8798
After the editor is attached as tab to the main window, looking up keyboard bindings using get_toplevel() no longer works. This uses the widget-hierarchy just like ARDOUR_UI does.
This commit is contained in:
parent
0b2b361b32
commit
5fb54c008d
1 changed files with 9 additions and 6 deletions
|
|
@ -390,13 +390,16 @@ UI::set_tip (Widget *w, const gchar *tip, const gchar *hlp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action) {
|
if (action) {
|
||||||
Bindings* bindings = (Bindings*) w->get_data ("ardour-bindings");
|
/* get_bindings_from_widget_heirarchy */
|
||||||
if (!bindings) {
|
Widget* ww = w;
|
||||||
Gtk::Window* win = (Gtk::Window*) w->get_toplevel();
|
Bindings* bindings = NULL;
|
||||||
if (win) {
|
do {
|
||||||
bindings = (Bindings*) win->get_data ("ardour-bindings");
|
bindings = (Bindings*) ww->get_data ("ardour-bindings");
|
||||||
}
|
if (bindings) {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
ww = ww->get_parent ();
|
||||||
|
} while (ww);
|
||||||
|
|
||||||
if (!bindings) {
|
if (!bindings) {
|
||||||
bindings = global_bindings;
|
bindings = global_bindings;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue