Refresh() has to do some operations even if there is no window available.
This fixes a bug in Diskprobe, thanks to Axel for reporting. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10543 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -3232,20 +3232,20 @@ BTextView::Refresh(int32 fromOffset, int32 toOffset, bool erase,
|
||||
bool scroll)
|
||||
{
|
||||
// TODO: Cleanup
|
||||
ASSERT(Window() != NULL);
|
||||
if (!Window())
|
||||
return;
|
||||
|
||||
float saveHeight = fTextRect.Height();
|
||||
int32 fromLine = LineAt(fromOffset);
|
||||
int32 toLine = LineAt(toOffset);
|
||||
int32 saveFromLine = fromLine;
|
||||
int32 saveToLine = toLine;
|
||||
float saveLineHeight = LineHeight(fromLine);
|
||||
BRect bounds = Bounds();
|
||||
|
||||
RecalculateLineBreaks(&fromLine, &toLine);
|
||||
|
||||
// TODO: Maybe there is still something we can do without a window...
|
||||
if (!Window())
|
||||
return;
|
||||
|
||||
BRect bounds = Bounds();
|
||||
float newHeight = fTextRect.Height();
|
||||
|
||||
// if the line breaks have changed, force an erase
|
||||
|
||||
Reference in New Issue
Block a user