[Qgis-developer] segmentation fault in plugin using zoom tool

Martin Dobias wonder.sk at gmail.com
Mon Oct 9 04:44:53 EDT 2006


On 10/6/06, Radim Blazek <radim.blazek at gmail.com> wrote:
> On 10/5/06, Martin Dobias <wonder.sk at gmail.com> wrote:
> > I see one problem: e.g. GRASS edit has its own set of map tools. The
> > question is what to do when grass edit ends - what tool to activate:
> > Leave map canvas without any tool? Set panning tool as active? If so,
> > how to get the pointer to panning tool to make sure that button
> > associated with the tool will be activated?
>
> Yes, plus you must check somehow if another tool was not selected
> already, for example:
> 1) grass - select new point tool
> 2) qgis - select identify feature tool
> 3) grass - exit editing
>
> In this situation we dont want to disable 'identify feature tool'
> we only have to delete 'grass new point tool' from last non-zoom.
> That is the reason I pass pointer to original tool to unsetMapTool
> so that current tool is only deleted if it matches the tool previously
> set by plugin.

Right, good point. I think the best would be to call unsetMapTool
automatically in destructor of map tool, thus map tool users won't
need to think about cases like this.

Martin



More information about the Qgis-developer mailing list