From c36a1de9d1b762355bbed31ab9b6672dc90aec43 Mon Sep 17 00:00:00 2001 From: Alexander Valavanis Date: Tue, 28 May 2019 15:08:01 +0100 Subject: Hackfest2019: Get rid of deprecated InkSelectOneAction --- src/ui/tools/lpe-tool.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/ui/tools/lpe-tool.cpp') diff --git a/src/ui/tools/lpe-tool.cpp b/src/ui/tools/lpe-tool.cpp index 55ec014ab..d1e7e186c 100644 --- a/src/ui/tools/lpe-tool.cpp +++ b/src/ui/tools/lpe-tool.cpp @@ -36,6 +36,7 @@ #include "util/units.h" +#include "ui/toolbar/lpe-toolbar.h" #include "ui/tools/lpe-tool.h" #include "ui/shape-editor.h" @@ -309,7 +310,13 @@ lpetool_context_switch_mode(LpeTool *lc, Inkscape::LivePathEffect::EffectType co int index = lpetool_mode_to_index(type); if (index != -1) { lc->mode = type; - lc->desktop->setToolboxSelectOneValue ("lpetool_mode_action", index); + auto tb = dynamic_cast(lc->desktop->get_toolbar_by_name("LPEToolToolbar")); + + if(tb) { + tb->set_mode(index); + } else { + std::cerr << "Could not access LPE toolbar" << std::endl; + } } else { g_warning ("Invalid mode selected: %d", type); return; -- cgit v1.2.3