fix hack for getting selection to "Really" update the frame

This commit is contained in:
mjudge%netscape.com 1999-03-14 01:18:47 +00:00
Родитель af8a9c4ee1
Коммит dbe82d4fb3
2 изменённых файлов: 28 добавлений и 4 удалений

Просмотреть файл

@ -1513,8 +1513,20 @@ nsFrame::SetSelected(nsSelectionStruct *aSelStruct)
nsRect rect; nsRect rect;
GetRect(rect); GetRect(rect);
ForceDrawFrame(this);//invalidate does not work in all cases. nsIFrame *frame = this;
//Invalidate(rect,PR_TRUE); //false is for not immediate nsIFrame *firstframe = nsnull;
while (NS_SUCCEEDED(frame->GetPrevInFlow(&frame)) && frame){
firstframe = frame;
}
if (firstframe){
nsRect rect2;
firstframe->GetRect(rect2);
rect.y-= rect.y-rect2.y;
}
//ForceDrawFrame(this);//invalidate does not work in all cases.
Invalidate(rect,PR_FALSE); //false is for not immediate
} }
return NS_OK; return NS_OK;
} }

Просмотреть файл

@ -1513,8 +1513,20 @@ nsFrame::SetSelected(nsSelectionStruct *aSelStruct)
nsRect rect; nsRect rect;
GetRect(rect); GetRect(rect);
ForceDrawFrame(this);//invalidate does not work in all cases. nsIFrame *frame = this;
//Invalidate(rect,PR_TRUE); //false is for not immediate nsIFrame *firstframe = nsnull;
while (NS_SUCCEEDED(frame->GetPrevInFlow(&frame)) && frame){
firstframe = frame;
}
if (firstframe){
nsRect rect2;
firstframe->GetRect(rect2);
rect.y-= rect.y-rect2.y;
}
//ForceDrawFrame(this);//invalidate does not work in all cases.
Invalidate(rect,PR_FALSE); //false is for not immediate
} }
return NS_OK; return NS_OK;
} }