             {
                 if (layerChildren[i] == value)
                 {
+                    value.parentChanged(null);
                     layerChildren.splice(i,1);
                     return;
                 }

         */
        protected function parentChanged(value:DesignLayer):void
        {
            if (_parent)
                _parent.removeLayer(this);
            
            _parent = value;

        protected function effectiveVisibilityChanged(value:Boolean):void
        {
            dispatchEvent(new PropertyChangeEvent("layerPropertyChange", false, 
                false, PropertyChangeEventKind.UPDATE, "effectiveVisibility", 
                !effectiveVisibility, effectiveVisibility));
            
            for (var i:int = 0; i < layerChildren.length; i++)
            {
