On exit editing mesh being linked multiple times, and other object-users have
a deform, the displists were not recalculated.
This commit is contained in:
Ton Roosendaal
2005-01-11 12:14:45 +00:00
parent 343712f367
commit b1a8ef6b30
3 changed files with 21 additions and 14 deletions

View File

@@ -1231,13 +1231,20 @@ void load_editMesh(void)
if(actkey) do_spec_key(me->key);
/* te be sure: clear ->vn pointers */
/* to be sure: clear ->vn pointers */
eve= em->verts.first;
while(eve) {
eve->vn= 0;
eve= eve->next;
}
/* clear deform or shade displists of all users */
if(me->id.us>1) {
Base *base;
for(base= G.scene->base.first; base; base= base->next) {
if(base->object->data==me) freedisplist(&base->object->disp);
}
}
/* we do make displist here for dependencies (like particles) */
if (mesh_uses_displist(me)) makeDispList(G.obedit);

View File

@@ -1139,7 +1139,7 @@ void drawfilespace(ScrArea *sa, void *spacedata)
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
sfile= curarea->spacedata.first;
sfile= sa->spacedata.first;
if(sfile->filelist==NULL) {
read_dir(sfile);
@@ -1154,8 +1154,8 @@ void drawfilespace(ScrArea *sa, void *spacedata)
else calc_file_rcts(sfile);
/* HEADER */
sprintf(name, "win %d", curarea->win);
block= uiNewBlock(&curarea->uiblocks, name, UI_EMBOSS, UI_HELV, curarea->win);
sprintf(name, "win %d", sa->win);
block= uiNewBlock(&sa->uiblocks, name, UI_EMBOSS, UI_HELV, sa->win);
uiSetButLock( sfile->type==FILE_MAIN && sfile->returnfunc, NULL);
@@ -1187,12 +1187,12 @@ void drawfilespace(ScrArea *sa, void *spacedata)
draw_filetext(sfile);
/* others diskfree etc ? */
scrarea_queue_headredraw(curarea);
scrarea_queue_headredraw(sa);
myortho2(-0.375, (float)(sa->winx)-0.375, -0.375, (float)(sa->winy)-0.375);
draw_area_emboss(sa);
curarea->win_swap= WIN_BACK_OK;
sa->win_swap= WIN_BACK_OK;
}
static void do_filescroll(SpaceFile *sfile)

View File

@@ -1363,7 +1363,7 @@ static int do_outliner_mouse_event(SpaceOops *soops, TreeElement *te, short even
/* event can enterkey, then it opens/closes */
void outliner_mouse_event(ScrArea *sa, short event)
{
SpaceOops *soops= curarea->spacedata.first;
SpaceOops *soops= sa->spacedata.first;
TreeElement *te;
float fmval[2];
short mval[2];
@@ -2223,12 +2223,12 @@ void draw_outliner(ScrArea *sa, SpaceOops *soops)
int sizey;
short ofsx, ofsy;
calc_scrollrcts(G.v2d, curarea->winx, curarea->winy);
calc_scrollrcts(G.v2d, sa->winx, sa->winy);
if(curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) {
if(sa->winx>SCROLLB+10 && sa->winy>SCROLLH+10) {
if(G.v2d->scroll) {
ofsx= curarea->winrct.xmin; /* because mywin */
ofsy= curarea->winrct.ymin;
ofsx= sa->winrct.xmin; /* because mywin */
ofsy= sa->winrct.ymin;
glViewport(ofsx+G.v2d->mask.xmin, ofsy+G.v2d->mask.ymin, ( ofsx+G.v2d->mask.xmax-1)-(ofsx+G.v2d->mask.xmin)+1, ( ofsy+G.v2d->mask.ymax-1)-( ofsy+G.v2d->mask.ymin)+1);
glScissor(ofsx+G.v2d->mask.xmin, ofsy+G.v2d->mask.ymin, ( ofsx+G.v2d->mask.xmax-1)-(ofsx+G.v2d->mask.xmin)+1, ( ofsy+G.v2d->mask.ymax-1)-( ofsy+G.v2d->mask.ymin)+1);
}
@@ -2243,7 +2243,7 @@ void draw_outliner(ScrArea *sa, SpaceOops *soops)
G.v2d->tot.xmax= (G.v2d->mask.xmax-G.v2d->mask.xmin);
G.v2d->tot.ymax= 0.0;
G.v2d->tot.ymin= -sizey*OL_H;
test_view2d(G.v2d, curarea->winx, curarea->winy);
test_view2d(G.v2d, sa->winx, sa->winy);
// align on top window if cur bigger than tot
if(G.v2d->cur.ymax-G.v2d->cur.ymin > sizey*OL_H) {
@@ -2263,7 +2263,7 @@ void draw_outliner(ScrArea *sa, SpaceOops *soops)
/* ortho corrected */
myortho2(G.v2d->cur.xmin-SCROLLB-0.375, G.v2d->cur.xmax-0.375, G.v2d->cur.ymin-0.375, G.v2d->cur.ymax-0.375);
block= uiNewBlock(&curarea->uiblocks, "outliner buttons", UI_EMBOSS, UI_HELV, sa->win);
block= uiNewBlock(&sa->uiblocks, "outliner buttons", UI_EMBOSS, UI_HELV, sa->win);
outliner_buttons(block, soops, &soops->tree);
uiDrawBlock(block);