code: def syncLayerData(self, layerData=None):
          
          if not self._layer:
              return
              
          if not layerData:
              layerData = self._layer.layerData()
          
          self.setVisible(layerData.get('visible', True))
          
          if layerData.get('current'):
              # set the default parameters
              flags  = self.ItemIsMovable 
              flags |= self.ItemIsSelectable 
              flags |= self.ItemIsFocusable
              
              # need this flag for Qt 4.6+
              try:
                  flags |= self.ItemSendsGeometryChanges
              except AttributeError:
                  pass
              
              self.setFlags(flags)
              self.setAcceptHoverEvents(True)
              self.setZValue(100)
              
          else:
              # set the default parameters
              self.setFlags(self.ItemIsFocusable)
              self.setAcceptHoverEvents(True)
              self.setZValue(layerData.get('zValue', 0))
          
          self.update()
docs: Syncs the layer information for this item from the given layer data.
          
          :param      layerData | <dict> || None