code: def _list_selection_changed(self):
          
          items = self.list_layers_in_map_report.selectedItems()
          self.remove_layer.setEnabled(len(items) >= 1)
          if len(items) == 1 and self.list_layers_in_map_report.count() >= 2:
              index = self.list_layers_in_map_report.indexFromItem(items[0])
              index = index.row()
              if index == 0:
                  self.move_up.setEnabled(False)
                  self.move_down.setEnabled(True)
              elif index == self.list_layers_in_map_report.count() - 1:
                  self.move_up.setEnabled(True)
                  self.move_down.setEnabled(False)
              else:
                  self.move_up.setEnabled(True)
                  self.move_down.setEnabled(True)
          else:
              self.move_up.setEnabled(False)
              self.move_down.setEnabled(False)
docs: Selection has changed in the list.