[GRASS-dev] Updating colorrules.py

Mohammed Rashad mohammedrashadkm at gmail.com
Wed Dec 19 19:20:51 PST 2012


Hi Anna,

Adding  a check for ultimatelistctrl widget and if not available can be
done. But remember using the old implementation will crash wxGUI.

How about If no ultimatelistctrl is not available we can add a copy of it
our own with a warning

Btw, I dont have a source build of wxpython. This comes with Ubuntu 12.04
LTS




On Thu, Dec 20, 2012 at 4:56 AM, Anna Kratochvílová
<kratochanna at gmail.com>wrote:

> On Wed, Dec 19, 2012 at 4:39 PM, Mohammed Rashad
> <mohammedrashadkm at gmail.com> wrote:
> > Hi All,
> >
> > gui/wxpython/modules/colorrules.py, providing inteface for setting
> > colortable for raster and vector.
> >
> > As I reported on trac[1] several weeks ago there is a bug in the code
> which
> > happens if no. color rules for raster map is big (eg: 32763 This for
> > nc_spm_08/landsat 4,3,2 color composite) . This will result in crashing
> the
> > whole wxGUI!
> >
> > The problem is for each rule colorrules.py create a checkbox,textCtrl and
> > ColorSelect.
> >
> > Creating these widgets will hangup the UI.
> >
> > A solution is to use a list control agw provides one such thing called
> > ultimatelistCtrl.
> >
> > I had updated the colorrules.py and made a patch for it. Anyone Please
> > review and update the file
>
> Hi Rashad,
>
> I can't even test your patch at the moment because UltimateListCtrl is
> not supported in wxPython 2.8.10.1 (which is installed on my
> computer). It seems that it is available from 2.8.11, however in the
> grass requirements, there is wxPython >= 2.8.1.1. I agree that this
> one is pretty old but still we must decide if it is worth changing the
> requirements. I think that the version I have is still used a lot so
> we should support it. You are using this widget to show the color I
> suppose. I am not aware of any other good solution. Maybe you can a
> condition on wxPython version and if it is high enough use this
> widget, otherwise use the current implementation?
>
> Anna
>
> >
> > PFA patch
> >
> > [0] http://trac.osgeo.org/grass/ticket/1816
> >
> >
> > --
> > Regards,
> >    Rashad
> >
> >
> > _______________________________________________
> > grass-dev mailing list
> > grass-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-dev
>



-- 
Regards,
   Rashad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20121220/7eb6c952/attachment.html>


More information about the grass-dev mailing list