Fix T62927: Assert when opening default 2.79 startup file in 2.80.

Not sure why that was asserted on instead of handling the flag properly,
if base is not selectable, then just do not select it...

Have the feeling this code handling sync of flags between bases and
objects could use some cleanup, but that will be for another day.
This commit is contained in:
2019-03-25 21:08:27 +01:00
parent e59a2fcc35
commit 82de58b318

View File

@@ -1735,9 +1735,8 @@ void BKE_scene_object_base_flag_sync_from_object(Base *base)
Object *ob = base->object;
base->flag = ob->flag;
if ((ob->flag & SELECT) != 0) {
if ((ob->flag & SELECT) != 0 && (base->flag & BASE_SELECTABLE) != 0) {
base->flag |= BASE_SELECTED;
BLI_assert((base->flag & BASE_SELECTABLE) != 0);
}
else {
base->flag &= ~BASE_SELECTED;