I was just going to implement Begin/EndViewTransaction(), but I saw

it is already implemented they way I thought it could be done - nice! Just
some simplifications.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24027 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2008-02-20 00:42:09 +00:00
parent f6a3e5637b
commit c3b57150e2
+2 -11
View File
@@ -637,12 +637,7 @@ void
BWindow::BeginViewTransaction() BWindow::BeginViewTransaction()
{ {
if (Lock()) { if (Lock()) {
if (fInTransaction) {
Unlock();
return;
}
fInTransaction = true; fInTransaction = true;
Unlock(); Unlock();
} }
} }
@@ -652,13 +647,9 @@ void
BWindow::EndViewTransaction() BWindow::EndViewTransaction()
{ {
if (Lock()) { if (Lock()) {
if (!fInTransaction) { if (fInTransaction)
Unlock(); fLink->Flush();
return;
}
fLink->Flush();
fInTransaction = false; fInTransaction = false;
Unlock(); Unlock();
} }
} }