Paint order fix
This commit is contained in:
+8
-6
@@ -226,13 +226,20 @@ bool Window::hasOpaqueRect(const rect_t & testRect) const
|
|||||||
void Window::fullPaint(BitmapBuffer * dc)
|
void Window::fullPaint(BitmapBuffer * dc)
|
||||||
{
|
{
|
||||||
bool paintNeeded = true;
|
bool paintNeeded = true;
|
||||||
|
std::list<Window *>::iterator firstChild;
|
||||||
|
|
||||||
coord_t xmin, xmax, ymin, ymax;
|
coord_t xmin, xmax, ymin, ymax;
|
||||||
dc->getClippingRect(xmin, xmax, ymin, ymax);
|
dc->getClippingRect(xmin, xmax, ymin, ymax);
|
||||||
coord_t x = dc->getOffsetX();
|
coord_t x = dc->getOffsetX();
|
||||||
coord_t y = dc->getOffsetY();
|
coord_t y = dc->getOffsetY();
|
||||||
|
|
||||||
auto firstChild = children.end();
|
if (windowFlags & PAINT_CHILDREN_FIRST) {
|
||||||
|
paintChildren(dc, children.begin());
|
||||||
|
dc->setOffset(x, y);
|
||||||
|
dc->setClippingRect(xmin, xmax, ymin, ymax);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
firstChild = children.end();
|
||||||
rect_t relativeRect = {xmin - x, ymin - y, xmax - xmin, ymax - ymin};
|
rect_t relativeRect = {xmin - x, ymin - y, xmax - xmin, ymax - ymin};
|
||||||
while (firstChild != children.begin()) {
|
while (firstChild != children.begin()) {
|
||||||
auto child = *(--firstChild);
|
auto child = *(--firstChild);
|
||||||
@@ -241,11 +248,6 @@ void Window::fullPaint(BitmapBuffer * dc)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (windowFlags & PAINT_CHILDREN_FIRST) {
|
|
||||||
paintChildren(dc, firstChild);
|
|
||||||
dc->setOffset(x, y);
|
|
||||||
dc->setClippingRect(xmin, xmax, ymin, ymax);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paintNeeded) {
|
if (paintNeeded) {
|
||||||
|
|||||||
Reference in New Issue
Block a user