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

This commit is contained in:
2018-01-26 09:13:31 +00:00
parent e340240ac7
commit ab09fb6ec0

View File

@@ -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();
}
}