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:
@@ -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