diff --git a/qad/graphic/graphic.cpp b/qad/graphic/graphic.cpp index 9acfc9a..1143629 100644 --- a/qad/graphic/graphic.cpp +++ b/qad/graphic/graphic.cpp @@ -478,6 +478,8 @@ void Graphic::setPaused(bool yes) { ui->checkPause->blockSignals(true); ui->checkPause->setChecked(yes); ui->checkPause->blockSignals(false); + for (int i = 0; i < graphics.size(); ++i) + graphics[i].cvrect = QRectF(); if (!pause_) { killTimer(timer_pause); timer_pause = 0; @@ -488,7 +490,6 @@ void Graphic::setPaused(bool yes) { graphics[i].polyline_pause = graphics[i].polyline; graphics[i].polyline_pause.detach(); graphics[i].max_x_pause = graphics[i].max_x; - graphics[i].cvrect = QRectF(); } timer_pause = startTimer(40); } @@ -589,7 +590,7 @@ void Graphic::setButtonsPosition(Graphic::Alignment a) { void Graphic::addPoint(const QPointF & p, int graphic, bool update_) { if (graphic >= graphics.size() || graphic < 0) return; GraphicType & t(graphics[graphic]); - if (!t.cvrect.isNull()) { + if (!t.cvrect.isNull() && !pause_) { // if (graphics[graphic].cvrect.contains(p)) // graphics[graphic].cvrect = QRectF(); if (t.cvrect.top() < p.y()) t.cvrect.setTop(p.y()); @@ -760,7 +761,8 @@ void Graphic::findGraphicsRect(double start_x, double end_x, double start_y, dou double cx, cy, maxX, minX, maxY, minY, vx; bool isRangeX = (start_x != end_x), isRangeY = (start_y != end_y); // bool isEmpty = true; - bool fast = true, can_fast = (start_x == 0 && end_x == 0 && start_y == 0 && end_y == 0); + //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); // foreach (const GraphicType & t, graphics) { // const QPolygonF & pol(pause_ ? t.polyline_pause : t.polyline); @@ -807,7 +809,7 @@ void Graphic::findGraphicsRect(double start_x, double end_x, double start_y, dou if (t.cvrect.right() < cx) t.cvrect.setRight(cx); if (t.cvrect.left() > cx) t.cvrect.setLeft(cx); } - fast = false; + //fast = false; } if (f) continue; //qDebug() << "[Graphic]" << "2 cvrect:" << t.cvrect;