def reset_region(self):
        self.dx = region_default_width
        self.dy = region_default_height

        obj = self.canvas.get_object_by_tag(self.picktag)
        if obj.kind != 'compound':
            return True
        bbox = obj.objects[0]

        # calculate center of bbox
        wd = bbox.x2 - bbox.x1
        dw = wd // 2
        ht = bbox.y2 - bbox.y1
        dh = ht // 2
        x, y = bbox.x1 + dw, bbox.y1 + dh

        # calculate new coords
        bbox.x1, bbox.y1, bbox.x2, bbox.y2 = (self.dx-x, y-self.dy,
                                              x+self.dx, y+self.dy)

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