1
0
Fork 0

Update to latest SimGear and fix eating up every 2nd scroll event

This commit is contained in:
Thomas Geymayer 2012-12-13 23:39:41 +01:00
parent 4bf4754f7b
commit c9976155d6
3 changed files with 4 additions and 6 deletions

View file

@ -305,8 +305,6 @@ bool GUIMgr::handleMouse(const osgGA::GUIEventAdapter& ea)
event->state = ea.getButtonMask();
event->mod = ea.getModKeyMask();
static simgear::Rect<float> resize_region;
if( !_resize_window.expired() )
{
switch( ea.getEventType() )
@ -353,7 +351,7 @@ bool GUIMgr::handleMouse(const osgGA::GUIEventAdapter& ea)
if( window_at_cursor )
{
const simgear::Rect<float>& reg = window_at_cursor->getRegion();
const SGRect<float>& reg = window_at_cursor->getRegion();
if( window_at_cursor->isResizable()
&& ( ea.getEventType() == osgGA::GUIEventAdapter::MOVE
@ -434,7 +432,7 @@ bool GUIMgr::handleMouse(const osgGA::GUIEventAdapter& ea)
// duplicate events, so lets ignore the second event with the same
// timestamp.
if( _last_scroll_time == ea.getTime() )
return true;
return window_at_cursor ? true : false;
_last_scroll_time = ea.getTime();
event->type = sc::Event::WHEEL;

View file

@ -89,7 +89,7 @@ namespace canvas
}
//----------------------------------------------------------------------------
const simgear::Rect<float>& Window::getRegion() const
const SGRect<float>& Window::getRegion() const
{
return _image.getRegion();
}

View file

@ -51,7 +51,7 @@ namespace canvas
virtual void valueChanged(SGPropertyNode* node);
osg::Group* getGroup();
const simgear::Rect<float>& getRegion() const;
const SGRect<float>& getRegion() const;
void setCanvas(simgear::canvas::CanvasPtr canvas);
simgear::canvas::CanvasWeakPtr getCanvas() const;