On Mon, Nov 17, 2008 at 7:38 PM, Möri Cedric <[EMAIL PROTECTED]> wrote:
> Hi all!
>
> I'm currently trying to uncheck an editing tool icon with my python plugin. 
> The following code works for non editing tools like zoom and pan:
>
> mc = self.iface.mapCanvas()
> layer = mc.currentLayer()
> tool = mc.mapTool()
> mc.unsetMapTool(tool)
>
> After this snippet, if the current tool is an non editing tool (e.g pan or 
> identify), there is no functionality  and the icons are unchecked. (That's 
> what I want)
>
> If I do the same for an editing tool (e.g capture polygon) as current tool, 
> the functionality has also gone but the icon is still checked.
>
> Has anybody a hint how I may uncheck editing icons (like it is when you 
> change from pan to capture an vice versa)?

Hi,

this was a minor bug in implementation... some of the map tools have
own implementation of deactivate() function and they were not calling
parent QgsMapTool::deactivate() so that's why for some map tools
unsetting was not working properly. I've fixed it in r9664 where I've
found this problem.

Regards
Martin
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to