Skip to content

Commit b56f8a5

Browse files
authored
fix: restore displaying of tool shortcut in the Tool button tooltip (synfig#3746)
1 parent 93acbf7 commit b56f8a5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

synfig-studio/src/gui/docks/dock_toolbox.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,11 @@ Dock_Toolbox::add_state(const Smach::state_base *state)
213213
std::string tooltip_string = state->get_local_name();
214214

215215
Gtk::AccelKey key;
216-
if (Gtk::AccelMap::lookup_entry(std::string("<Actions>/action_group_state_manager/state-") + state->get_name(), key)) {
216+
if (Gtk::AccelMap::lookup_entry(std::string("<Actions>/action_group_state_manager/set-state-") + state->get_name(), key)) {
217217
tooltip_string += " ";
218-
tooltip_string += gtk_accelerator_get_label(key.get_key(), GdkModifierType(key.get_mod()));
218+
gchar* accel_text = gtk_accelerator_get_label(key.get_key(), GdkModifierType(key.get_mod()));
219+
tooltip_string += accel_text;
220+
g_free(accel_text);
219221
}
220222
tooltip->set_text(tooltip_string);
221223
return true;

0 commit comments

Comments
 (0)