[Qgis-user] Setting the current active layer programmatically

luca_manganelli at comune.trento.it luca_manganelli at comune.trento.it
Mon Dec 7 06:49:22 PST 2009


Hi,

I am writing a plugin that does some editing operations giving the
possibility to undo operations.
But the UNDO operation is enabled only if the active layer in the legend is
equal to edited layer.

We have the:

   qgsinterface::activeLayer ()  but no   qgisinterface::setActiveLayer ().

And the :

  qgsmapcanvas::setCurrentLayer (....)  (then  qgsmapcanvas::refresh ( ) )
doesn't resolve the problem.

Any hint?




More information about the Qgis-user mailing list