From ab09fb6ec0ab6bd81a4a9a378df666bc38132ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Fri, 26 Jan 2018 09:13:31 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/libs@349 a8b55f48-bf90-11e4-a774-851b48703e85 --- qad/graphic/graphic.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qad/graphic/graphic.cpp b/qad/graphic/graphic.cpp index 1143629..892a56e 100644 --- a/qad/graphic/graphic.cpp +++ b/qad/graphic/graphic.cpp @@ -1322,9 +1322,13 @@ void Graphic::tick(int index, bool slide, bool update_) { if (history > 0.) while (t.polyline.size() > 1) { if (fabs(t.polyline.back().x() - t.polyline.front().x()) <= history) break; + /// TODO: [Graphic] fast autofit while addPoint(double y, ...) if (!t.cvrect.isNull()) { - if (!t.cvrect.contains(t.polyline.first())) { - /// TODO: [Graphic] add smart remove for fast autofit + QPointF fp(t.polyline.first()); + if (qFuzzyCompare(t.cvrect.left(), fp.x()) || + qFuzzyCompare(t.cvrect.right(), fp.x()) || + qFuzzyCompare(t.cvrect.top(), fp.y()) || + qFuzzyCompare(t.cvrect.bottom(), fp.y())) { t.cvrect = QRectF(); } }