[Qgis-user] uncheck editing tool (python plugin)
Möri Cedric
Cedric.Moeri at bd.so.ch
Mon Nov 17 10:38:00 PST 2008
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)?
Best regards
Cédric
mit freundlichen Grüssen
Cédric Möri
GIS-Informatiker
--
Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
Rötistrasse 4
4501 Solothurn
Telefon: +41 (0)32 627 24 75
Telefax: +41 (0)32 627 22 14
mailto:cedric.moeri at bd.so.ch
http://www.agi.so.ch
More information about the Qgis-user
mailing list