aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-12-13 12:34:41 +0100
committerSebastian Geerken <devnull@localhost>2014-12-13 12:34:41 +0100
commitc897465aeefacaba3172dd136a386bd3ef2728f7 (patch)
treee23442b660b51630025044bc71f7f8e89877e280
parentcf42b1f93f3db9e97724988f8929d5f735b037fb (diff)
Another bug fix related to z-indices iteration.
-rw-r--r--dw/stackingcontextmgr.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/dw/stackingcontextmgr.cc b/dw/stackingcontextmgr.cc
index ac025534..ef330852 100644
--- a/dw/stackingcontextmgr.cc
+++ b/dw/stackingcontextmgr.cc
@@ -58,15 +58,14 @@ void StackingContextMgr::addChildSCWidget (Widget *widget)
int pos = findZIndex (widget->getStyle()->zIndex, true);
DBG_OBJ_MSGF ("common.scm", 1, "pos = %d", pos);
if (pos == -1) {
+ pos = findZIndex (widget->getStyle()->zIndex, false);
+ DBG_OBJ_MSGF ("common.scm", 1, "pos = %d", pos);
+
numZIndices++;
+ DBG_OBJ_SET_NUM ("numZIndices", numZIndices);
zIndices = (int*)(zIndices ?
realloc (zIndices, numZIndices * sizeof (int)) :
malloc (numZIndices * sizeof (int)));
-
- DBG_OBJ_SET_NUM ("numZIndices", numZIndices);
-
- pos = findZIndex (widget->getStyle()->zIndex, false);
- DBG_OBJ_MSGF ("common.scm", 1, "pos = %d", pos);
for (int i = numZIndices - 1; i >= pos + 1; i--) {
zIndices[i] = zIndices[i - 1];