bool
TargetMapWindow::OnMouseUp(PixelScalar x, PixelScalar y)
{
  DragMode old_drag_mode = drag_mode;
  drag_mode = DRAG_NONE;

  if (old_drag_mode != DRAG_NONE) {
    ReleaseCapture();
    PaintWindow::Invalidate();
  }

  switch (old_drag_mode) {
  case DRAG_NONE:
  case DRAG_TARGET_OUTSIDE:
    break;

  case DRAG_TARGET:
    TargetDragged(drag_last.x, drag_last.y);
    return true;

  case DRAG_OZ:
    TargetDragged(drag_last.x, drag_last.y);
    return true;
  }

  return false;
}
bool
TargetMapWindow::OnMouseUp(PixelScalar x, PixelScalar y)
{
  if (drag_mode != DRAG_NONE)
    ReleaseCapture();

  DragMode old_drag_mode = drag_mode;
  drag_mode = DRAG_NONE;

  switch (old_drag_mode) {
  case DRAG_NONE:
    break;

  case DRAG_TARGET:
    TargetDragged(drag_last.x, drag_last.y);
    return true;

  case DRAG_OZ:
    TargetDragged(drag_last.x, drag_last.y);
    return true;
  }

  return false;
}