Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashed when moving Measurement; #234

Open
renkehub opened this issue Feb 25, 2022 · 0 comments
Open

Crashed when moving Measurement; #234

renkehub opened this issue Feb 25, 2022 · 0 comments

Comments

@renkehub
Copy link

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant