Removes this layer from the scene.  If the removeItems flag is set to \
        True, then all the items on this layer will be removed as well.  \
        Otherwise, they will be transferred to another layer from the scene.
        
        :param      removeItems | <bool>
        
        :return     <bool>

def remove(self, removeItems=False):
        """
        Removes this layer from the scene.  If the removeItems flag is set to \
        True, then all the items on this layer will be removed as well.  \
        Otherwise, they will be transferred to another layer from the scene.
        
        :param      removeItems | <bool>
        
        :return     <bool>
        """
        # makes sure this can be removed
        if not self.prepareToRemove():
            return False
        
        items = self.items()
        
        # grabs the next layer
        if self._scene._layers:
            new_layer = self._scene._layers[0]
        else:
            new_layer = None
        
        # removes the items from the scene if flagged
        if removeItems:
            self.scene().removeItems(items)
        
        # otherwise assign to the next layer
        else:
            for item in items:
                item.setLayer(new_layer)
        
        # remove the layer from the scenes reference
        if self in self._scene._layers:
            self._scene._layers.remove(self)
        
        if new_layer:
            new_layer.setCurrent()
        
        self._scene.setModified()
        
        return True