[GRASS-dev] How to check if a vector map is multi-layer?

Anna Petrášová kratochanna at gmail.com
Thu Nov 13 06:55:11 PST 2014


On Thu, Nov 13, 2014 at 5:23 AM, Luca Delucchi <lucadeluge at gmail.com> wrote:

> On 13 November 2014 02:47, Anna Petrášová <kratochanna at gmail.com> wrote:
>
> >
> > Hi Luca,
> >
>
> Hi Anna,
>
> >>
> >>
> >> I improved you patch adding a new combobox to choose the layer number.
> >> I have some problems with wxpython:
> >> - I added two GError (if the vector has no areas or if the vector has
> >> no dblinks), but when they appear they are back to the layertree, I
> >> tried to close the layertree before using Dismiss() but it return me
> >> and error
> >>
> >> - I'm not able to cleanup the layer number combox if the vector is
> >> without dblinks o without areas
> >>
> > can you try this new version? I also did some changes for wxPython 3
> > compatibility
> >
>
> thanks a lot I committed it (with some small changes).
> Your was a workaround, not a fix of my problem, but I like the idea,
> it is simpler and it works ;-)
>

For workaround, you could have  used wx.CallAfter like this:
self.vectselect.Bind(wx.EVT_TEXT, lambda evt: wx.CallAfter(self.OnVector,
evt))

which would solve the problem with the hanging combo tree. The info label
is in my opinion better solution anyway and it should be used more often in
wxGUI instead of poping up error dialogs.
>
>
> Just a question, my implementation was wrong or is a limit of wxpython?
>

If you are talking about the combo layertree behavior, I think it's a bug,
this widget has a lot of other issues.

>
> > Anna
> >
>
> --
> ciao
> Luca
>
> http://gis.cri.fmach.it/delucchi/
> www.lucadelu.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20141113/7219fb94/attachment.html>


More information about the grass-dev mailing list