From 8529a2256b9452f4f052c59b8331f03c913c147a Mon Sep 17 00:00:00 2001 From: eJya Date: Wed, 19 Mar 2025 09:43:01 +0530 Subject: [PATCH] Toogle tool icons in toolbar preferences The tool icons in the toolbar preferences were not toggling. This fix ensures that buttons toggle their visibility in the toolbar. The issue was caused by `signal_toggled` in `inkscape-preferences.cpp`, which was not hitting the toggle funtion. Fixes: https://gitlab.com/inkscape/inkscape/-/issues/5595 --- src/ui/dialog/inkscape-preferences.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 3ca4dcdfb5..4b76035e1f 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -1950,7 +1950,9 @@ void InkscapePreferences::initPageUI() auto path = Inkscape::UI::Toolbar::ToolToolbar::get_tool_visible_button_path(action_name); auto visible = Inkscape::Preferences::get()->getBool(path, true); button->set_active(visible); - button->signal_toggled().connect([=](){ + button->signal_clicked().connect([=](){ + bool new_state = !button->get_active(); + button->set_active(new_state); Inkscape::Preferences::get()->setBool(path, button->get_active()); }); auto *iapp = InkscapeApplication::instance(); -- GitLab