summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/spray-tool.cpp
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2019-06-05 19:34:19 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2019-06-05 19:34:19 +0000
commit346e764345e1fbf877307313cd4779874dfd3ed9 (patch)
treed5c326e85f752a1cd54301bc19592d90d9445e51 /src/ui/tools/spray-tool.cpp
parentMerge changes (diff)
parentFinish TextToolbar migration (diff)
downloadinkscape-346e764345e1fbf877307313cd4779874dfd3ed9.tar.gz
inkscape-346e764345e1fbf877307313cd4779874dfd3ed9.zip
Merge branch 'text-toolbar-migration'
Diffstat (limited to 'src/ui/tools/spray-tool.cpp')
-rw-r--r--src/ui/tools/spray-tool.cpp10
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);