      def faces_count_matches(self, item):
          """ Check the selected face exits """
          frame_name, number_alignments = item[0], item[2]
          number_faces = len(self.items.items.get(frame_name, list()))
          return bool(number_alignments == 0
                      or number_alignments == number_faces)
  
      def remove_alignment(self, item):
          """ Remove the alignment from the alignments file """
          del_count = 0
          frame_name, alignments, number_alignments = item[:3]
 
</s> remove                                self.verbose)
 </s> add                                self.verbose,
                               dfl=True) </s> remove                 else:
                    dfl.seek(chunk_length+12, os.SEEK_CUR)
 </s> add                 dfl.seek(chunk_length+12, os.SEEK_CUR) </s> remove             index = int(filename[filename.rindex("_") + 1:])
            original_file = "{}".format(filename[:filename.rindex("_")])
 </s> add             index = 0
            original_file = ""
            if not self.dfl:
                index = int(filename[filename.rindex("_") + 1:])
                original_file = "{}".format(filename[:filename.rindex("_")]) </s> remove             top_left, top_right  = original_roi[0], original_roi[3]
 </s> add             top_left, top_right = original_roi[0], original_roi[3]
        return bool(number_alignments in(0, number_faces))
      def faces_count_matches(self, item):
          """ Check the selected face exits """
          frame_name, number_alignments = item[0], item[2]
          number_faces = len(self.items.items.get(frame_name, list()))
        return bool(number_alignments in(0, number_faces))
        return bool(number_alignments in(0, number_faces))
  
      def remove_alignment(self, item):
          """ Remove the alignment from the alignments file """
          del_count = 0
          frame_name, alignments, number_alignments = item[:3]
keep keep keep keep replace replace keep keep keep keep keep
 Alignments Tool - Fix DFL Index bug (#526)

* Alignments tool. Fix DFL Alignments index bug 
tools/lib_alignments/jobs.py