result = []
for image_name,remove_button in zip(self.image_names,
self.image_names_remove_buttons):
result.extend((image_name, remove_button))
result.append(self.image_name_add_button)
for object_name,remove_button in zip(self.object_names,
self.object_name_remove_buttons):
result.extend((object_name,remove_button))
After Change
def visible_settings(self):
result = []
for im in self.images:
result += im.unpack_group()
result += [self.add_image_button, self.divider]
for im in self.objects:
result += im.unpack_group()
result += [self.add_object_button]