Fixes: #19553. Additionally: * Removed 2 unused attributes (`self.lastSnappedObject` and `self.active`). * Improved the readability of `snapToObject` a little bit. * Made the return value of that function consistent (vector or None).