Button Space: clear pin flag when NULL'ing pointer
This commit is contained in:
@@ -823,6 +823,7 @@ static void scene_unlink_space_buts(SpaceButs *sbuts, Scene *sce)
|
||||
{
|
||||
if (sbuts->pinid == &sce->id) {
|
||||
sbuts->pinid = NULL;
|
||||
sbuts->flag &= ~SB_PIN_CONTEXT;
|
||||
}
|
||||
|
||||
BKE_spacedata_id_unref((SpaceLink *)sbuts, &sce->id);
|
||||
|
||||
@@ -5975,6 +5975,9 @@ static void lib_link_screen(FileData *fd, Main *main)
|
||||
else if (sl->spacetype == SPACE_BUTS) {
|
||||
SpaceButs *sbuts = (SpaceButs *)sl;
|
||||
sbuts->pinid = newlibadr(fd, sc->id.lib, sbuts->pinid);
|
||||
if (sbuts->pinid == NULL) {
|
||||
sbuts->flag &= ~SB_PIN_CONTEXT;
|
||||
}
|
||||
}
|
||||
else if (sl->spacetype == SPACE_FILE) {
|
||||
;
|
||||
@@ -6304,6 +6307,9 @@ void blo_lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *cursc
|
||||
else if (sl->spacetype == SPACE_BUTS) {
|
||||
SpaceButs *sbuts = (SpaceButs *)sl;
|
||||
sbuts->pinid = restore_pointer_by_name(newmain, sbuts->pinid, USER_IGNORE);
|
||||
if (sbuts->pinid == NULL) {
|
||||
sbuts->flag &= ~SB_PIN_CONTEXT;
|
||||
}
|
||||
|
||||
/* TODO: restore path pointers: T40046
|
||||
* (complicated because this contains data pointers too, not just ID)*/
|
||||
|
||||
Reference in New Issue
Block a user