From cf42b1f93f3db9e97724988f8929d5f735b037fb Mon Sep 17 00:00:00 2001 From: Sebastian Geerken Date: Sat, 13 Dec 2014 12:23:25 +0100 Subject: Bug fix related to z-indices iteration. --- dw/stackingcontextmgr.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dw/stackingcontextmgr.cc') diff --git a/dw/stackingcontextmgr.cc b/dw/stackingcontextmgr.cc index 9761e402..ac025534 100644 --- a/dw/stackingcontextmgr.cc +++ b/dw/stackingcontextmgr.cc @@ -68,8 +68,8 @@ void StackingContextMgr::addChildSCWidget (Widget *widget) pos = findZIndex (widget->getStyle()->zIndex, false); DBG_OBJ_MSGF ("common.scm", 1, "pos = %d", pos); - for (int i = numZIndices - 2; i >= pos; i--) { - zIndices[i] = zIndices[i + 1]; + for (int i = numZIndices - 1; i >= pos + 1; i--) { + zIndices[i] = zIndices[i - 1]; DBG_OBJ_ARRSET_NUM ("zIndex", i, zIndices[i]); } -- cgit v1.2.3