diff --git a/src/meshlab/glarea.cpp b/src/meshlab/glarea.cpp index 05ad27cde..8c0822214 100644 --- a/src/meshlab/glarea.cpp +++ b/src/meshlab/glarea.cpp @@ -812,26 +812,33 @@ void GLArea::tabletEvent(QTabletEvent*e) void GLArea::wheelEvent(QWheelEvent*e) { - setFocus(); - const int WHEEL_STEP = 120; - float notch = e->delta()/ float(WHEEL_STEP); - switch(e->modifiers()) - { - case Qt::ShiftModifier + Qt::ControlModifier : clipRatioFar = math::Clamp( clipRatioFar*powf(1.2f, notch),0.01f,5000.0f); break; - case Qt::ControlModifier : clipRatioNear = math::Clamp(clipRatioNear*powf(1.2f, notch),0.01f,50.0f); break; + setFocus(); + if( (iEdit && !suspendedEditor) ) + { + iEdit->wheelEvent(e,*mm(),this); + } + else + { + const int WHEEL_STEP = 120; + float notch = e->delta()/ float(WHEEL_STEP); + switch(e->modifiers()) + { + case Qt::ShiftModifier + Qt::ControlModifier : clipRatioFar = math::Clamp( clipRatioFar*powf(1.2f, notch),0.01f,5000.0f); break; + case Qt::ControlModifier : clipRatioNear = math::Clamp(clipRatioNear*powf(1.2f, notch),0.01f,50.0f); break; case Qt::AltModifier : glas.pointSize = math::Clamp(glas.pointSize*powf(1.2f, notch),0.01f,150.0f); foreach(MeshModel * mp, this->md()->meshList) mp->glw.SetHintParamf(GLW::HNPPointSize,glas.pointSize); - break; - case Qt::ShiftModifier : fov = math::Clamp(fov+1.2f*notch,5.0f,90.0f); break; - default: + break; + case Qt::ShiftModifier : fov = math::Clamp(fov+1.2f*notch,5.0f,90.0f); break; + default: if(isRaster()) this->opacity = math::Clamp( opacity*powf(1.2f, notch),0.1f,1.0f); else trackball.MouseWheel( e->delta()/ float(WHEEL_STEP)); - break; - } - update(); + break; + } + } + update(); }