X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUPERVGUI%2FSUPERVGUI_CanvasLink.cxx;h=74b6b762b769fd65dfb1bf8a7d8466a76c5a820c;hb=cbb0219fe6d6bf11f98f2306c2855fef1eaa2d44;hp=4ed27d15d741bcbf2d62166426ce14cf7768a114;hpb=b7b531f894fd0a967071ce2b05e0ced7b4743f3b;p=modules%2Fsuperv.git diff --git a/src/SUPERVGUI/SUPERVGUI_CanvasLink.cxx b/src/SUPERVGUI/SUPERVGUI_CanvasLink.cxx index 4ed27d1..74b6b76 100644 --- a/src/SUPERVGUI/SUPERVGUI_CanvasLink.cxx +++ b/src/SUPERVGUI/SUPERVGUI_CanvasLink.cxx @@ -522,6 +522,12 @@ void SUPERVGUI_CanvasPointPrs::moveBy(double dx, double dy) QCanvasEllipse::moveBy(dx, dy); if (myInEdge) myInEdge->setFromPoint((int)x(), (int)y()); if (myOutEdge) myOutEdge->setToPoint((int)x(), (int)y()); + //resize canvas view if mouse is outside + int w = (int)(x()+dx) + width() + GRAPH_MARGIN; + int h = (int)(y()+dy) + height() + GRAPH_MARGIN; + if (canvas()->width() > w) w = canvas()->width(); + if (canvas()->height() > h) h = canvas()->height(); + if (canvas()->width() < w || canvas()->height() < h) canvas()->resize(w, h); if (myIndex > 0 && isMoving()) { myLink->getEngine()->ChangeCoord(myIndex, (int)x(), (int)y()); }