Gui: implement SoMouseWheelEvent
and sythesize it instead of fake buttons 4 and 5
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include "Application.h"
|
||||
#include "Document.h"
|
||||
#include "NavigationStyle.h"
|
||||
#include "SoMouseWheelEvent.h"
|
||||
#include "SoFCSelectionAction.h"
|
||||
#include "SoFCOffscreenRenderer.h"
|
||||
#include "SoFCVectorizeSVGAction.h"
|
||||
@@ -1992,6 +1993,10 @@ void View3DInventorPy::eventCallback(void * ud, SoEventCallback * n)
|
||||
|
||||
dict.setItem("Button", Py::String(button));
|
||||
}
|
||||
if (e->isOfType(SoMouseWheelEvent::getClassTypeId())){
|
||||
const SoMouseWheelEvent* mwe = static_cast<const SoMouseWheelEvent*>(e);
|
||||
dict.setItem("Delta", Py::Long(mwe->getDelta()));
|
||||
}
|
||||
if (e->isOfType(SoSpaceballButtonEvent::getClassTypeId())) {
|
||||
const SoSpaceballButtonEvent* sbe = static_cast<const SoSpaceballButtonEvent*>(e);
|
||||
std::string button;
|
||||
|
||||
Reference in New Issue
Block a user