git-svn-id: svn://db.shs.com.ru/libs@35 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2015-10-01 08:36:47 +00:00
parent fd7aad5149
commit 995ff5ab3b
4 changed files with 9 additions and 7 deletions

View File

@@ -461,7 +461,7 @@ void Graphic::setHistorySize(double val) {
double x;
for (int i = 0; i < graphics.size(); ++i) {
QPolygonF & pol(graphics[i].polyline);
if (pol.isEmpty()) continue;
if (pol.isEmpty() || history <= 0.) continue;
x = pol.back().x() - history;
for (int j = pol.size() - 2; j >= 0 ; --j)
if (pol[j].x() < x) {
@@ -1088,10 +1088,11 @@ void Graphic::tick(int index, bool slide, bool update_) {
if (slide) {
mutex.lock();
GraphicType & t(graphics[index]);
while (t.polyline.size() > 1) {
if (fabs(t.polyline.back().x() - t.polyline.front().x()) <= history) break;
t.polyline.pop_front();
}
if (history > 0.)
while (t.polyline.size() > 1) {
if (fabs(t.polyline.back().x() - t.polyline.front().x()) <= history) break;
t.polyline.pop_front();
}
}
if (!update_) {
findGraphicsRect();