* Added a BWindow::InViewTransaction() that determines whether or not the
window is currently updating its drawings as suggested by Stippi. * Add this method to decide whether to call _FontChanged() in BListView::SetFont(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34109 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
289d85d2ac
commit
09749e95dc
@ -185,6 +185,7 @@ public:
|
||||
void EndViewTransaction();
|
||||
// referred as CommitViewTransaction()
|
||||
// in BeBook
|
||||
bool InViewTransaction() const;
|
||||
|
||||
BRect Bounds() const;
|
||||
BRect Frame() const;
|
||||
|
@ -655,10 +655,9 @@ void
|
||||
BListView::SetFont(const BFont* font, uint32 mask)
|
||||
{
|
||||
BView::SetFont(font, mask);
|
||||
//_FontChanged();
|
||||
// TODO: this absolutely kills the performance, if a BListItem
|
||||
// changes the font when drawing - if this should be called at all,
|
||||
// it should only be done outside any updates!
|
||||
|
||||
if (Window() != NULL && !Window()->InViewTransaction())
|
||||
_FontChanged();
|
||||
}
|
||||
|
||||
|
||||
|
@ -682,6 +682,14 @@ BWindow::EndViewTransaction()
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BWindow::InViewTransaction() const
|
||||
{
|
||||
BAutolock locker(const_cast<BWindow*>(this));
|
||||
return fInTransaction;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BWindow::IsFront() const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user