Sets the current layer for this scene to the inputed layer.
        
        :param      layer | <XNodeLayer> || None

def setCurrentLayer(self, layer):
        """
        Sets the current layer for this scene to the inputed layer.
        
        :param      layer | <XNodeLayer> || None
        """
        if self._currentLayer == layer:
            return False
        
        old = self._currentLayer
        self._currentLayer = layer
        
        if old is not None:
            old.sync()
        if layer is not None:
            layer.sync()
        
        self.selectionFinished.emit()
        self.invalidate()
        
        return True