mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +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) {
|
||||
Bindings* bindings = (Bindings*) w->get_data ("ardour-bindings");
|
||||
if (!bindings) {
|
||||
Gtk::Window* win = (Gtk::Window*) w->get_toplevel();
|
||||
if (win) {
|
||||
bindings = (Bindings*) win->get_data ("ardour-bindings");
|
||||
/* get_bindings_from_widget_heirarchy */
|
||||
Widget* ww = w;
|
||||
Bindings* bindings = NULL;
|
||||
do {
|
||||
bindings = (Bindings*) ww->get_data ("ardour-bindings");
|
||||
if (bindings) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
ww = ww->get_parent ();
|
||||
} while (ww);
|
||||
|
||||
if (!bindings) {
|
||||
bindings = global_bindings;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue