Update to latest SimGear and fix eating up every 2nd scroll event
This commit is contained in:
parent
4bf4754f7b
commit
c9976155d6
3 changed files with 4 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace canvas
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const simgear::Rect<float>& Window::getRegion() const
|
||||
const SGRect<float>& Window::getRegion() const
|
||||
{
|
||||
return _image.getRegion();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue