-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
BugEither a bug report, or a bug fix. Let's hope for the latter!Either a bug report, or a bug fix. Let's hope for the latter!
Description
What is the bug or the crash?
If you excecute Python command "layer.selectByIds([id])" where layer is QgsVectorLayer and id not exists in layer, then the result of command "layer.selectedFeatureCount()" will be 1 instead of 0!
I checked on version from 3.16 to 3.40.
Steps to reproduce the issue
excecute Python command
layer.selectByIds([1111222222]) '1111222222 is not exists
cnt = layer.selectedFeatureCount() ' cnt is not 0
Versions
from 3.16 to 3.40
Supported QGIS version
- I'm running a supported QGIS version according to the roadmap.
New profile
- I tried with a new QGIS profile
Additional context
No response
Metadata
Metadata
Assignees
Labels
BugEither a bug report, or a bug fix. Let's hope for the latter!Either a bug report, or a bug fix. Let's hope for the latter!