From 28723e6fef0069a2f080d3819b72b24e9fe84b48 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 Jan 2010 11:40:43 +0000 Subject: [PATCH] From Jean-Sebastien Guay, "was testing an osgWidget-based test app I have and noticed that I couldn't move the windows/frames around on the screen anymore. Turns out that the virtual methods' interface changed in the EventInterface base class, the third argument to mouseDrag() is now const, but it was not changed in the derived classes, so it still compiled but the derived-class version was not being called because its arguments differed. Here are the changes that fix it. " --- include/osgWidget/Frame | 4 ++-- src/osgWidget/Frame.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/osgWidget/Frame b/include/osgWidget/Frame index a0f05d886..b33c79a83 100644 --- a/include/osgWidget/Frame +++ b/include/osgWidget/Frame @@ -95,7 +95,7 @@ class OSGWIDGET_EXPORT Frame: public Table Corner (const Corner&, const osg::CopyOp&); virtual void parented (Window*); - virtual bool mouseDrag (double, double, WindowManager*); + virtual bool mouseDrag (double, double, const WindowManager*); CornerType getCornerType() const { @@ -128,7 +128,7 @@ class OSGWIDGET_EXPORT Frame: public Table virtual void parented (Window*); virtual void positioned (); - virtual bool mouseDrag (double, double, WindowManager*); + virtual bool mouseDrag (double, double, const WindowManager*); BorderType getBorderType() const { diff --git a/src/osgWidget/Frame.cpp b/src/osgWidget/Frame.cpp index 507a1a4d6..612e97b22 100644 --- a/src/osgWidget/Frame.cpp +++ b/src/osgWidget/Frame.cpp @@ -50,7 +50,7 @@ void Frame::Corner::parented(Window* window) { if(parent->canResize()) setEventMask(EVENT_MASK_MOUSE_DRAG); } -bool Frame::Corner::mouseDrag(double x, double y, WindowManager* wm) +bool Frame::Corner::mouseDrag(double x, double y, const WindowManager* wm) { Frame* parent = dynamic_cast(getParent()); @@ -137,7 +137,7 @@ void Frame::Border::positioned() } } -bool Frame::Border::mouseDrag(double x, double y, WindowManager* wm) +bool Frame::Border::mouseDrag(double x, double y, const WindowManager* wm) { Frame* parent = dynamic_cast(getParent());