checks if name has been changed and ignores the name change if the changed_item is an existing script
        Args:
            changed_item:

def name_changed(self, changed_item):
        """
        checks if name has been changed and ignores the name change if the changed_item is an existing script
        Args:
            changed_item:
        """
        name = str(changed_item.text())

        # if the item has been moved we ignore this because the item only went from one tree to the other without changing names
        if name != '':
            if name != self.selected_element_name:
                self.elements_from_file[name] = self.elements_from_file[self.selected_element_name]
                del self.elements_from_file[self.selected_element_name]
                self.selected_element_name = name