Ignore:
Timestamp:
Oct 31, 2025, 10:09:00 PM (2 months ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.1, stable
Children:
71423c
Parents:
33f34f
Message:

FIX: Fixed relaying events in derived Qt classes.

  • we always need to pass the event on to the base class by default.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp

    r33f34f r511f02  
    607607void GLWorldView::mousePressEvent(QMouseEvent *event)
    608608{
    609   QGLView::mousePressEvent(event);
    610 
    611609  // check for right mouse button
    612610  if (event->button() == Qt::RightButton) {
     
    616614  // Reset the saved mouse position.
    617615  lastMousePos = event->posF();
     616 
     617   QGLView::mousePressEvent(event);
    618618}
    619619
     
    642642      camera()->translateEye(- d.x(), d.y(), 0);
    643643    }
    644   }else{
    645     // Without this Qt would not test for hover events (i.e. mouse over an atom).
    646     QGLView::mouseMoveEvent(event);
    647   }
     644  }
     645  QGLView::mouseMoveEvent(event);
    648646}
    649647
     
    664662  // Set new eye position.
    665663  camera()->setEye(camera()->center() + d);
     664
     665  QGLView::wheelEvent(event);
    666666}
    667667
     
    732732{
    733733  needsRedraw = true;
    734   emit changed();
    735734  emit hoverChanged(_id);
     735  emit changed();
    736736}
    737737
     
    739739{
    740740  needsRedraw = true;
    741   emit changed();
    742741  emit hoverChanged(_id, _i);
    743 }
     742  emit changed();
     743}
Note: See TracChangeset for help on using the changeset viewer.