computationalpathologygroup / ASAP

Program for the analysis and visualization of whole-slide images in digital pathology
https://computationalpathologygroup.github.io/ASAP/
GNU General Public License v2.0
613 stars 164 forks source link

Crashed when moving Measurement; #234

Open renkehub opened 2 years ago

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