From 7eebcdc8a686c6f2697952cf7f60d2a5345617e9 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: Tue, 11 Feb 2020 09:44:21 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/libs@716 a8b55f48-bf90-11e4-a774-851b48703e85 --- qad/graphic/graphic.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/qad/graphic/graphic.cpp b/qad/graphic/graphic.cpp index cfd1ad9..8fd8530 100644 --- a/qad/graphic/graphic.cpp +++ b/qad/graphic/graphic.cpp @@ -934,8 +934,8 @@ void Graphic::findGraphicsRect(double start_x, double end_x, double start_y, dou //bool fast = true; bool can_fast = (start_x == 0 && end_x == 0 && start_y == 0 && end_y == 0); bool anyVisible = false, isTimeLimit = (visible_time > 0.) && !(isRangeX || isRangeY); - bool force_find = (visible_time > 0.) && (history > 0.) && (visible_time < history); - if (force_find) can_fast = false; + //bool force_find = (visible_time > 0.) && (history > 0.) && (visible_time < history); + //if (force_find) can_fast = false; // foreach (const GraphicType & t, graphics) { // const QPolygonF & pol(pause_ ? t.polyline_pause : t.polyline); // if (!pol.isEmpty()) { @@ -1027,7 +1027,13 @@ void Graphic::findGraphicsRect(double start_x, double end_x, double start_y, dou else if (isRangeY) selrect.setRect(minX, start_y, maxX - minX, end_y - start_y); else grect.setRect(minX, minY, maxX - minX, maxY - minY); grect = grect.normalized(); - if (isFit)/* || isRangeX || isRangeY)*/ selrect = grect; + if (isFit)/* || isRangeX || isRangeY)*/ { + if (visible_time > 0.) { + if (grect.width() > visible_time) + grect.setLeft(grect.right() - visible_time); + } + selrect = grect; + } setRectToLines(); }