                  if (self._canvas.optional_annotations["mesh"]
                          or frame_idx == self._active_frame.frame_index
                          or refresh_annotations):
                      landmarks = self.get_landmarks(frame_idx, face_idx, face, top_left,
                                                     refresh=refresh_annotations)
                      self._locate_mesh(mesh_ids, landmarks)
  
      def _discard_tk_faces(self):
          """ Remove any :class:`TKFace` objects from the cache that are not currently displayed. """
          keys = ["{}_{}".format(pnt_x, pnt_y)
 
</s> remove         self._images = []
        self._meshes = []
 </s> add     def _remove_rows(self, existing_rows, required_rows):
        """ Remove and recycle rows from the viewport that are not in the view area.

        Parameters
        ----------
        existing_rows: int
            The number of existing rows within the viewport
        required_rows: int
            The number of rows required by the viewport
        """
        logger.debug("Removing rows from viewport: (existing_rows: %s, required_rows: %s)",
                     existing_rows, required_rows)
        self._recycle_objects(self._images[required_rows: existing_rows].flatten().tolist(),
                              self._meshes[required_rows: existing_rows].flatten().tolist())
        self._images = self._images[:required_rows]
        self._meshes = self._meshes[:required_rows]
        logger.trace("self._images: %s, self._meshes: %s",
                     self._images.shape, self._meshes.shape) </s> remove         return np.array(self._canvas.coords(self._images[0][0]), dtype="int")
 </s> add         if self._images is None or not np.any(self._images):
            retval = [0, 0]
        else:
            retval = self._canvas.coords(self._images[0][0])
        return np.array(retval, dtype="int") </s> remove         if point_x > self._grid.dimensions[0]:
 </s> add         if not self._grid.is_valid or point_x > self._grid.dimensions[0]: </s> remove     def _recycle_objects(self):
        """  On a column count change, place all existing objects into the recycle bin so that
        they can be used for the new grid shape and reset the objects size to the new size. """
 </s> add     def _reset_viewport(self):
        """ Reset all objects in the viewport on a column count change. Reset the viewport size
        to the newly specified face size. """
        logger.debug("Resetting Viewport")
                                                   refresh=True)
                  if (self._canvas.optional_annotations["mesh"]
                          or frame_idx == self._active_frame.frame_index
                          or refresh_annotations):
                      landmarks = self.get_landmarks(frame_idx, face_idx, face, top_left,
                                                   refresh=True)
                      self._locate_mesh(mesh_ids, landmarks)
  
      def _discard_tk_faces(self):
          """ Remove any :class:`TKFace` objects from the cache that are not currently displayed. """
          keys = ["{}_{}".format(pnt_x, pnt_y)
keep keep keep keep replace keep keep keep keep keep
 Bugfix - Manual Tool
  - Fix non-appearing landmark annotations in face viewer 
tools/manual/faceviewer/viewport.py