← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2200: reduce tab flickering

 

------------------------------------------------------------
revno: 2200
committer: poy <poy@xxxxxxxxxx>
branch nick: repo
timestamp: Tue 2010-08-10 17:31:21 +0200
message:
  reduce tab flickering
modified:
  dwt/src/widgets/TabView.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dwt/src/widgets/TabView.cpp'
--- dwt/src/widgets/TabView.cpp	2010-08-08 12:10:20 +0000
+++ dwt/src/widgets/TabView.cpp	2010-08-10 15:31:21 +0000
@@ -615,9 +615,11 @@
 }
 
 void TabView::handlePainting(PaintCanvas& canvas) {
-	bool oldMode = canvas.setBkMode(true);
-
 	Rectangle rect(canvas.getPaintRect());
+	if(rect.width() == 0 || rect.height() == 0)
+		return;
+
+	bool oldMode = canvas.setBkMode(true);
 
 	int sel = getSelected();
 	Rectangle selRect;