def draw_cb(self, canvas, tag):
        obj = canvas.get_object_by_tag(tag)
        if obj.kind != 'rectangle':
            return True
        canvas.delete_object_by_tag(tag)

        if self.picktag:
            try:
                canvas.delete_object_by_tag(self.picktag)
            except:
                pass

        # determine center of rectangle
        x1, y1, x2, y2 = obj.get_llur()
        x = x1 + (x1 - x2) // 2
        y = y1 + (y2 - y1) // 2

        tag = canvas.add(self.dc.CompoundObject(
            self.dc.Rectangle(x1, y1, x2, y2,
                              color=self.pickcolor),
            self.dc.Point(x, y, 10, color='red'),
            self.dc.Text(x1, y2+4, '{0}: calc'.format(self._textlabel),
                         color=self.pickcolor)))
        self.picktag = tag

        return self.redo()
dataset/ETHPy150Open ejeschke/ginga/ginga/misc/plugins/Pick.py/Pick.draw_cb/swapped operands of `-`