Fixed small annoyonce that was there for long;

New objects were not created with correct 'ipowin' value, to denote the
default ipo to show. That caused sometimes wrong display with weird empty
menu button in header.
This commit is contained in:
Ton Roosendaal 2004-07-26 22:46:56 +00:00
parent 73f1da749b
commit d0da285547
3 changed files with 9 additions and 2 deletions

@ -647,7 +647,7 @@ Object *add_object(int type)
ob->upflag= OB_POSZ; ob->upflag= OB_POSZ;
} }
ob->ipoflag = OB_OFFS_OB+OB_OFFS_PARENT; ob->ipoflag = OB_OFFS_OB+OB_OFFS_PARENT;
ob->ipowin= ID_OB; /* the ipowin shown */
ob->dupon= 1; ob->dupoff= 0; ob->dupon= 1; ob->dupoff= 0;
ob->dupsta= 1; ob->dupend= 100; ob->dupsta= 1; ob->dupend= 100;

@ -4236,6 +4236,7 @@ static void do_versions(Main *main)
} }
if(main->versionfile <= 233) { if(main->versionfile <= 233) {
Material *ma= main->mat.first; Material *ma= main->mat.first;
Object *ob= main->object.first;
while(ma) { while(ma) {
if(ma->rampfac_col==0.0) ma->rampfac_col= 1.0; if(ma->rampfac_col==0.0) ma->rampfac_col= 1.0;
@ -4243,6 +4244,12 @@ static void do_versions(Main *main)
if(ma->pr_lamp==0) ma->pr_lamp= 3; if(ma->pr_lamp==0) ma->pr_lamp= 3;
ma= ma->id.next; ma= ma->id.next;
} }
/* this should have been done loooong before! */
while(ob) {
if(ob->ipowin==0) ob->ipowin= ID_OB;
ob= ob->id.next;
}
} }
/* don't forget to set version number in blender.c! */ /* don't forget to set version number in blender.c! */

@ -4130,7 +4130,7 @@ void allqueue(unsigned short event, short val)
scrarea_queue_headredraw(sa); scrarea_queue_headredraw(sa);
if(val) { if(val) {
si= sa->spacedata.first; si= sa->spacedata.first;
if (!G.sipo->pin) if (si->pin==0)
si->blocktype= val; si->blocktype= val;
} }
} }