Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] filter selection problem

> Hmmm.  Sounds a little like a bug... I'll try to take a look at it.   
> Could you put a break point in the renderer to verify that it gets  
> triggered again after you put the filter on.

Absolutely, but I need some quick help on what that means :)

>   Also...
> 
> Is the feature a new feature?

No, an existing one.

> Or does it exist in the layer?
> Does it start to work if you delete the .fix file?

No.

The thing is really strange, I have two ways to do the selection:
1) I understand from a particular logic in an algorithm that the feature
will be single and just add that fid and send the command - this has
the problem

2) I check all the features and in the end i add all the found fids to
the filter. The funny thing is that this can mean that i could have
also just one feature in the end. When that applies however the feature
is rendered. -> works

I use the same filter for both the cases and the same command is
launched, so i can't really understand what happens...
The only thing that could be is that the command comes to quickly to
send the selection command, but that sounds dummy.

No idea at all.
Andrea


> 
> Jesse
> 
> On Oct 10, 2007, at 10:06 AM, Andrea Antonello wrote:
> 
> > Hi, I'm running into a strange problem with programmatic selection  
> > on a
> > layer:
> >
> > I create a fid filter adding the fids of the needed features:
> >
> > FidFilter fidFilter =
> > FilterFactoryFinder.createFilterFactory().createFidFilter();
> >
> > add the needed fids:
> >
> > fidFilter.addFid(feature.getID());
> >
> > and afterwards as copied from the selection tool the following
> > renders the selected features:
> >
> > MapCommand command =
> > getContext().getSelectionFactory().createSelectCommand(basinLayer,
> > fidFilter);
> >
> > getContext().sendASyncCommand(command);
> > selecting = false;
> > shapeCommand.setValid(false);
> > getContext().getViewportPane().repaint();
> >
> >
> > This works like a charms, apart of the situation in which I add
> > jsut a single feature. In that case the feature gets selected in
> > the table view, but not rendered inside the map window.
> >
> > Any idea about what that could be? I can't find a reason...
> >
> > Thanks,
> > Andrea
> > _______________________________________________
> > User-friendly Desktop Internet GIS (uDig)
> > http://udig.refractions.net
> > http://lists.refractions.net/mailman/listinfo/udig-devel
> 
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top