Bug report #6018

fTools:Select by location is confusing, especially with an empty selection

Added by Leyan Ouyang over 11 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Processing/QGIS
Affected QGIS version:master Regression?:
Operating System: Easy fix?:
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:15403

Description

I used "Select by location" in the fTools plugin, with the options to use selected features only. The progress bar started the movement left and right used for an unknown amount of remaining time, so I waited, surprised that my small data set was so hard to select.

Actually, the selection was empty and no calculation was happening, but it took me the longest time to realize it. The problem is twofold:
  • nothing prevents using an empty selection (even if it cannot be useful), but self.progressBar.setMaximum(len(features)) on line 114 of doSelectByLocation.py does not have the expected result when features is an empty list as it makes an endlessly moving progress bar
  • More globally, the plugin doesn't indicate anything when the computation is finished. I would have expected either closing the window or at least showing a message indicating the number of selected features. Something like: "%d features have been selected, the existing selection had %d features, the new selection has %d features" % (nbSelected, nbPrevious, nbEndResult) ))@ at the end of the compute() function

qgis_select_by_location.mkv - screencast (336 KB) Leyan Ouyang, 2013-09-14 01:22 AM

History

#1 Updated by Paolo Cavallini over 11 years ago

  • Target version set to Version 2.0.0

#2 Updated by Giovanni Manghi over 10 years ago

  • Status changed from Open to Closed
  • Target version changed from Version 2.0.0 to Future Release - Nice to have
  • Resolution set to worksforme

The first issue does not seems to happen (anymore).

About the second suggestion, the number of selected features is shown in the left bottom corner of the main qgis window.

#3 Updated by Leyan Ouyang over 10 years ago

  • Status changed from Closed to Reopened

The problem still exists in the latest Master build. Clear all selection, start "select by location" tool, check the "use selected feature only" (I agree it does not make sense, but one can check it by mistake like I did the first time). Then when starting the process no actual computation happens (well, there aren't any feature to consider) but the progress bar is continuously moving, which is very misleading.

#4 Updated by Giovanni Manghi over 10 years ago

  • Status changed from Reopened to Feedback

Leyan Ouyang wrote:

The problem still exists in the latest Master build. Clear all selection, start "select by location" tool, check the "use selected feature only" (I agree it does not make sense, but one can check it by mistake like I did the first time). Then when starting the process no actual computation happens (well, there aren't any feature to consider) but the progress bar is continuously moving, which is very misleading.

I tested another dataset and still works fine here. If there are no features selected and then the "use selected features only" is checked, then the tool works as it is expected (at least for me)... using all features to make the selection.

#5 Updated by Leyan Ouyang over 10 years ago

Sorry, I forgot to provide feedback about this bug. Here is a screencast of what I mean.

#6 Updated by Giovanni Manghi over 10 years ago

  • Status changed from Feedback to Open
  • Priority changed from Normal to Low
  • Resolution deleted (worksforme)

Ok, now I see it.

#7 Updated by Alexander Bruy almost 8 years ago

  • Status changed from Open to Closed

Does not happen anymore with Processing. Please reopen if necessary

#8 Updated by Giovanni Manghi almost 7 years ago

The "ftools" category is being removed from the tracker, changing the category of this ticket to "Processing/QGIS" to not leave the category orphaned.

Also available in: Atom PDF