Fix wrong object mode checking in snap code
The value of `OB_MODE_OBJECT` is 0, this makes it unsuitable as a bitflag. Issue pointed out at https://pvs-studio.com/en/blog/posts/cpp/0922/ Thanks to Andrey Karpov
This commit is contained in:
parent
8322a4f6b7
commit
8e88af9934
|
@ -491,7 +491,7 @@ static void iter_snap_objects(SnapObjectContext *sctx,
|
|||
}
|
||||
}
|
||||
else if (snap_select == SNAP_NOT_SELECTED) {
|
||||
if (is_object_active && !(base->object->mode & OB_MODE_OBJECT)) {
|
||||
if (is_object_active && base->object->mode != OB_MODE_OBJECT) {
|
||||
/* Pass. Consider the selection of elements being edited. */
|
||||
}
|
||||
else if ((base->flag & BASE_SELECTED) || (base->flag_legacy & BA_WAS_SEL)) {
|
||||
|
|
Loading…
Reference in New Issue