def _on_left_up ( self, event = None ):
        need_refresh = self._button_down
        if need_refresh:
            self.ReleaseMouse()
            self._button_down = False

        if self._selected is not None:
            wdx, wdy = self.GetClientSizeTuple()
            x        = event.GetX()
            y        = event.GetY()
            if (0 <= x < wdx) and (0 <= y < wdy):
                if self._selected != -1:
                    self.Selected( True )
                elif need_refresh:
                    self.Refresh()
                if self._handler is not None:
                    self._handler( self )
                return

        if need_refresh:
            self.Refresh()

    #---------------------------------------------------------------------------
    #  Handles the control being re-painted:
    #---------------------------------------------------------------------------
Handles the user clicking the control.
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/image_control.py/ImageControl._on_left_up