Hi all!

The question is how to activate some tool from the code. For example,
click on some button will activate DistanceTool - its icon will be
shown on toolbar, its cursor will be shown.
I tried to do like this:
                                ((AbstractModalTool) 
ApplicationGIS.getToolManager()
                                                
.getActiveTool()).setActive(false);
                                SimpleTool select = (SimpleTool) ApplicationGIS
                                                .getToolManager().findTool(
                                                                nededToolID);
                                select.setActive(true);

But this code doesn't update toolbar and cursor; and when we select
another tool from toolbar, the tool that was activated in that code
remains active. So, this is wrong.

Can you describe me rigth way to activate tool?
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to