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. "
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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<Frame*>(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<Frame*>(getParent());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user