Exemplo n.º 1
0
bool Interactor2D::ProcessMouseUpEvent( wxMouseEvent& event, RenderView* renderview )
{
  RenderView2D* view = ( RenderView2D* )renderview;

  if ( m_bSelecting )
  {
    view->StopSelection();
    view->NeedRedraw();
  }
  
  m_nMousePosX = event.GetX();
  m_nMousePosY = event.GetY();
  m_bWindowLevel = false;
  m_bChangeSlice = false;
  m_bMovingCursor = false;
  m_bSelecting = false;

  view->UpdateAnnotation();
  view->Update2DOverlay();

  if ( event.LeftUp() )
  {
    return false;
  }
  else
  {
    return Interactor::ProcessMouseUpEvent( event, renderview );
  }
}
Exemplo n.º 2
0
bool Interactor2D::ProcessMouseUpEvent( QMouseEvent* event, RenderView* renderview )
{
  RenderView2D* view = ( RenderView2D* )renderview;

  if ( m_bSelecting )
  {
    view->StopSelection();
    view->RequestRedraw();
  }

  m_nMousePosX = event->x();
  m_nMousePosY = event->y();
  m_bWindowLevel = false;
  m_bChangeSlice = false;
  m_bMovingCursor = false;
  m_bSelecting = false;

  view->UpdateAnnotation();
  view->Update2DOverlay();

  if ( event->button() == Qt::LeftButton )
  {
    return false;
  }
  else
  {
    return Interactor::ProcessMouseUpEvent( event, renderview );
  }
}