diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2019-05-28 14:08:01 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2019-05-28 14:08:01 +0000 |
| commit | c36a1de9d1b762355bbed31ab9b6672dc90aec43 (patch) | |
| tree | 0e5b3320f9d6999b682bdd330f3a4df8ac627bed /src/ui/tools/spray-tool.cpp | |
| parent | Hackfest2019: Drop unused EgeAdjustmentAction (diff) | |
| download | inkscape-c36a1de9d1b762355bbed31ab9b6672dc90aec43.tar.gz inkscape-c36a1de9d1b762355bbed31ab9b6672dc90aec43.zip | |
Hackfest2019: Get rid of deprecated InkSelectOneAction
Diffstat (limited to 'src/ui/tools/spray-tool.cpp')
| -rw-r--r-- | src/ui/tools/spray-tool.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ui/tools/spray-tool.cpp b/src/ui/tools/spray-tool.cpp index 28990bd2d..5fed9e806 100644 --- a/src/ui/tools/spray-tool.cpp +++ b/src/ui/tools/spray-tool.cpp @@ -62,6 +62,7 @@ #include "svg/svg.h" #include "svg/svg-color.h" +#include "ui/toolbar/spray-toolbar.h" #include "ui/tools/spray-tool.h" #include "ui/dialog/dialog-manager.h" @@ -1210,7 +1211,14 @@ static void sp_spray_update_area(SprayTool *tc) static void sp_spray_switch_mode(SprayTool *tc, gint mode, bool with_shift) { // Select the button mode - SP_EVENT_CONTEXT(tc)->desktop->setToolboxSelectOneValue("spray_tool_mode", mode); + auto tb = dynamic_cast<UI::Toolbar::SprayToolbar*>(SP_EVENT_CONTEXT(tc)->desktop->get_toolbar_by_name("SprayToolbar")); + + if(tb) { + tb->set_mode(mode); + } else { + std::cerr << "Could not access Spray toolbar" << std::endl; + } + // Need to set explicitly, because the prefs may not have changed by the previous tc->mode = mode; tc->update_cursor(with_shift); |
