SVN commit 659876 by arwalker: restore fix for bug 143805 M +13 -6 kstviewellipse.cpp --- branches/work/kst/1.5/kst/src/libkstapp/kstviewellipse.cpp #659875:659876 @@ -95,15 +95,22 @@ } } - const int bw(_borderWidth * p.lineWidthAdjustmentFactor()); + const QRect g(geometry()); + int bw(_borderWidth * p.lineWidthAdjustmentFactor()); + + if (bw > g.width()/2) { + bw = g.width()/2; + } + if (bw > g.height()/2) { + bw = g.height()/2; + } QPen pen(bw > 0 ? _borderColor : _foregroundColor, bw); p.setPen(pen); if (_transparentFill) { - p.setBrush(Qt::NoBrush); + p.setBrush(Qt::NoBrush); } else { p.setBrush(_foregroundColor); } - const QRect g(geometry()); p.drawEllipse(g.x() + bw/2, g.y() + bw/2, g.width() - bw, g.height() - bw); p.restore(); } @@ -178,10 +185,10 @@ signed int KstViewEllipse::directionFor(const QPoint& pos) { signed int direction = KstViewObject::directionFor(pos); - if (!(((direction & (UP|DOWN)) == 0) || ((direction & (LEFT|RIGHT)) == 0))) { - // not an edge. + if (!(((direction & (UP|DOWN)) == 0) || ((direction & (LEFT|RIGHT)) == 0))) { + // not an edge direction |= CENTEREDRESIZE; - } + } return direction; }