From 55e76891869441f8ef8d54283748fcf2fb336bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 14 Feb 2016 21:55:26 +0100 Subject: [PATCH] Fix regression introduced in 4e7fa2f04e6e643407cafc8beaa51ee2a5e9caff --- src/item/Item.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/item/Item.js b/src/item/Item.js index bad56abd..17c98664 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -2329,11 +2329,11 @@ new function() { // Injection scope for hit-test functions shared with project } else { // If the item is removed and inserted it again further /// above, the index needs to be adjusted accordingly. - var parent = item._parent, - shift = parent === this && item._index < index; + var owner = item._getOwner(), + shift = owner === this && item._index < index; // Notify parent of change. Don't notify item itself yet, - // as we're doing so when adding it to the new parent below. - if (parent && item._remove(false, true) && shift) + // as we're doing so when adding it to the new owner below. + if (owner && item._remove(false, true) && shift) index--; } }