tool activate()

Casper Boemann cbr at boemann.dk
Mon Mar 21 10:09:43 CET 2005


On Monday 21 March 2005 10:00, Boudewijn Rempt wrote:
> On Monday 21 March 2005 09:09, Casper Boemann wrote:
> > activate() is called twice (along with -6 times update, as if the tool is
> > installed twice), when I click on its icon the first time, but then it
> > isn't called anymore, even if I switch to say a brush and back.
>
> Every tool _is_ installed three times, once for the mouse, once for the
> stylus and once for the eraser end of the stylus.
ok

btw I did a little error so now, the activate is called (still twice) each 
time I click the icon

> The problem you describe above looks a lot like the problems I initially
> had when I made the crop tool a plugin. You need to be careful which action
> collection you add the tool action to. Did you take the crop tool as a
> template? Is your new tool a plugin?
Yes I took crop as a template, and hence it's a plugin

> > Also there is a clean() method, which seems to do what I want
> > deactivate() to be.
>
> ??? In which file?
in core/tool/kis_tool.h
and implementeted in kis_tool_non_paint to do nothing


-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list