Open renkehub opened 2 years ago
When I select multi Measurement items then move these item, the program crashed!
it seems the function "moveCoordinatesBy" has a bug: forget adding "prepareGeometryChange"
void QtAnnotation::moveCoordinatesBy(const Point& moveBy) { // should add prepareGeometryChange ; std::vector coords = _annotation->getCoordinates(); for (std::vector::iterator it = coords.begin(); it != coords.end(); ++it) { it->setX(it->getX() + moveBy.getX() / _scale); it->setY(it->getY() + moveBy.getY() / _scale); } _annotation->setCoordinates(coords); this->setPos(QPointF(coords[0].getX()_scale, coords[0].getY()_scale)); onAnnotationChanged(); emit annotationChanged(this); }
void QtAnnotation::onAnnotationChanged() { return; }
When I select multi Measurement items then move these item, the program crashed!
it seems the function "moveCoordinatesBy" has a bug: forget adding "prepareGeometryChange"
void QtAnnotation::moveCoordinatesBy(const Point& moveBy) { // should add prepareGeometryChange ; std::vector coords = _annotation->getCoordinates();
for (std::vector::iterator it = coords.begin(); it != coords.end(); ++it) {
it->setX(it->getX() + moveBy.getX() / _scale);
it->setY(it->getY() + moveBy.getY() / _scale);
}
_annotation->setCoordinates(coords);
this->setPos(QPointF(coords[0].getX()_scale, coords[0].getY()_scale));
onAnnotationChanged();
emit annotationChanged(this);
}
void QtAnnotation::onAnnotationChanged() { return; }