Feature request #2735

fTools: random selection issues

Added by Paolo Cavallini over 11 years ago. Updated about 11 years ago.

Status:Closed
Priority:Low
Assignee:cfarmer -
Category:Python plugins
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:12795

Description

The fTools selection tools have problems:

- selecting a number of features does not work (% is ok)

- stratified selection throws an error: Traceback (most recent call last):

File "/usr/share/qgis/python/plugins/fTools/tools/doSubsetSelect.py", line 79, in accept self.compute(inVect, uidField, value, perc, self.progressBar) File "/usr/share/qgis/python/plugins/fTools/tools/doSubsetSelect.py", line 107, in compute if atMap[index] == QVariant(i): KeyError: 9

Versione Python: 2.6.5 (r265:79063, Mar 18 2010, 23:59:47) [GCC 4.4.3]

fix_2735.diff Magnifier - Fix Random selection (select by number) (1.45 KB) Alexander Bruy, 2010-06-22 10:22 AM

fix__2735_selection_within_subset.diff Magnifier - Fix Random selection within subsets (1.74 KB) Giuseppe Sucameli, 2010-07-03 05:40 PM

Associated revisions

Revision bc166a8e
Added by cfarmer - about 11 years ago

patch from alex to fix #2735

git-svn-id: http://svn.osgeo.org/qgis/trunk/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 9060b5a9
Added by cfarmer - about 11 years ago

patch from alex to fix #2735

git-svn-id: http://svn.osgeo.org/qgis/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Paolo Cavallini over 11 years ago

I think we cannot release 1.5 with this broken tool. Looks an easy fix

#2 Updated by Alexander Bruy over 11 years ago

Added patch to fix first issue (selecting a number of features)

#3 Updated by cfarmer - about 11 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

fixed in 9060b5a9 (SVN r13860)

#4 Updated by Paolo Cavallini about 11 years ago

  • Resolution deleted (fixed)
  • Status changed from Closed to Feedback

Tested again on cc8ba684 (SVN r13876), same error:

An error has occured while executing Python code:

Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/fTools/tools/doSubsetSelect.py", line 79, in accept
self.compute(inVect, uidField, value, perc, self.progressBar)
File "/usr/share/qgis/python/plugins/fTools/tools/doSubsetSelect.py", line 107, in compute
if atMap[index] == QVariant(i):
KeyError: 1

Python version:
2.6.5+ (release26-maint, Jul 1 2010, 00:00:44)
[GCC 4.4.4]

#5 Updated by Giuseppe Sucameli about 11 years ago

Replying to [comment:5 pcav]:

Tested again on cc8ba684 (SVN r13876), same error:

As alexbrui had reported by his attachment message, his patch fixed only the selection by number (the first issue).
I've been searching for the second problem, but I haven't found it yet. I think is very important to fix it ASAP, it blocks the release...

#6 Updated by Giuseppe Sucameli about 11 years ago

Attached a patch to fix the random selection within subsets (the second issue).
Now we can finally close this ticket!

#7 Updated by cfarmer - about 11 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

Apologies for delay in fixing final issue! Patch applied in 771fe9aa (SVN r13886).

Thanks to brushtyler!

Carson

#8 Updated by Paolo Cavallini about 11 years ago

Checked, it works for me now.

Also available in: Atom PDF