Gui: Pass wheel event to viewprovider

=====================================

https://forum.freecadweb.org/viewtopic.php?p=578857#p578857
This commit is contained in:
Abdullah Tahiri
2022-03-13 10:00:17 +01:00
committed by abdullahtahiriyo
parent 33577a087f
commit 85cf3ca514
3 changed files with 23 additions and 3 deletions

View File

@@ -1493,14 +1493,17 @@ SbBool NavigationStyle::processEvent(const SoEvent * const ev)
SbBool NavigationStyle::processSoEvent(const SoEvent * const ev)
{
bool processed = false;
bool offeredtoViewerEventBase = false;
//handle mouse wheel zoom
if (ev->isOfType(SoMouseWheelEvent::getClassTypeId())) {
const SoMouseWheelEvent * const event = static_cast<const SoMouseWheelEvent *>(ev);
processed = processWheelEvent(event);
viewer->processSoEventBase(ev);
offeredtoViewerEventBase = true;
}
if (!processed) {
if (!processed && !offeredtoViewerEventBase) {
processed = viewer->processSoEventBase(ev);
}