You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
The move constructor is moving all the member variables of the class, but it should also set the mouse callback again since it was set to point to the original object.
I believe the fixed move ctor in CvPlot/inc/CvPlot/gui/Window.h should look like this:
inline
Window::Window(Window && a)
:_mouseAdapter(std::move(a._mouseAdapter))
, _windowName(std::move(a._windowName))
, _mat(std::move(a._mat) ){
cv::setMouseCallback(_windowName, [](int event, int x, int y, int flags, void* userdata) {
Window& window = *static_cast<Window*>(userdata);
window.updateSize();
MouseEvent mouseEvent(window._mouseAdapter.getAxes(), window._mat.size(), event, x, y, flags);
if (window._mouseAdapter.mouseEvent(mouseEvent)) {
window.update();
}
}, this);
}
The text was updated successfully, but these errors were encountered:
Hi,
The move constructor is moving all the member variables of the class, but it should also set the mouse callback again since it was set to point to the original object.
I believe the fixed move ctor in
CvPlot/inc/CvPlot/gui/Window.h
should look like this:The text was updated successfully, but these errors were encountered: