| Summary: | (PATCH) highlighting kmahjongg tiles causes audio skips | ||
|---|---|---|---|
| Product: | [Applications] kmahjongg | Reporter: | Andreas Leuner <almighty> |
| Component: | general | Assignee: | Albert Astals Cid <aacid> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Andreas Leuner
2005-12-20 12:57:45 UTC
SVN commit 490094 by aacid:
Change some repaints to update()
Does not make the behaviour different but seems a bit less CPU-intensive
Thanks for the patch
BUGS: 118711
M +32 -4 boardwidget.cpp
--- branches/KDE/3.5/kdegames/kmahjongg/boardwidget.cpp #490093:490094
@@ -1537,7 +1537,14 @@
}
if (doRepaint) {
updateBackBuffer=true;
- repaint(false);
+ if (testWFlags(WNoAutoErase))
+ update();
+ else
+ {
+ setWFlags(getWFlags() | WNoAutoErase );
+ update();
+ setWFlags(getWFlags() & (~WNoAutoErase) );
+ }
}
}
@@ -1547,7 +1554,14 @@
void BoardWidget::drawBoard(bool )
{
updateBackBuffer=true;
- repaint(false);
+ if (testWFlags(WNoAutoErase))
+ update();
+ else
+ {
+ setWFlags(getWFlags() | WNoAutoErase );
+ update();
+ setWFlags(getWFlags() & (~WNoAutoErase) );
+ }
drawTileNumber();
}
@@ -1563,7 +1577,14 @@
Game.hilighted[E][Y][X] = 0;
if (doRepaint) {
updateBackBuffer=true;
- repaint(false);
+ if (testWFlags(WNoAutoErase))
+ update();
+ else
+ {
+ setWFlags(getWFlags() | WNoAutoErase );
+ update();
+ setWFlags(getWFlags() & (~WNoAutoErase) );
+ }
}
}
@@ -1585,7 +1606,14 @@
Game.putTile( E, Y, X, 0 );
if (doRepaint) {
updateBackBuffer=true;
- repaint(false);
+ if (testWFlags(WNoAutoErase))
+ update();
+ else
+ {
+ setWFlags(getWFlags() | WNoAutoErase );
+ update();
+ setWFlags(getWFlags() & (~WNoAutoErase) );
+ }
}
}
|