From 03018c2f56855c6c9006f7feace63febdef7bc52 Mon Sep 17 00:00:00 2001 From: Stefano Facchini Date: Fri, 20 Oct 2017 17:10:39 +0200 Subject: Refactor SPDesktop::setEventContext to allow for unsetting the current tool Passing the empty string as toolName has the effect of unsetting and freeing the current tool. This will be used in a future commit. --- src/ui/tools-switch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/tools-switch.cpp') diff --git a/src/ui/tools-switch.cpp b/src/ui/tools-switch.cpp index d87bcc51d..e2803ccfd 100644 --- a/src/ui/tools-switch.cpp +++ b/src/ui/tools-switch.cpp @@ -157,7 +157,7 @@ tools_switch(SPDesktop *dt, int num) dt->_tool_changed.emit(num); } - dt->set_event_context2(tool_names[num]); + dt->setEventContext(tool_names[num]); /* fixme: This is really ugly hack. We should bind and unbind class methods */ /* First 4 tools use guides, first is undefined but we don't care */ dt->activate_guides(num < 5); -- cgit v1.2.3