- if (snapCoord1.valid)
- {
- // snap point
-//This is causing segfaults in the Qt::Painter code...
-//*This* is causing the segfault!
-//Actually, it looks like buggy painting code in PaintInterface()...
- painter->drawCircle(toGui(snapCoord1), 4);
-
-#if 1
- // crosshairs:
- if (showCrosshairs1 == true)
- {
- painter->setPen(RS_Pen(RS_Color(0, 255, 255), RS2::Width00, RS2::DashLine));
- painter->drawLine(Vector(0, toGuiY(snapCoord1.y)),
- Vector(getWidth(), toGuiY(snapCoord1.y)));
- painter->drawLine(Vector(toGuiX(snapCoord1.x), 0),
- Vector(toGuiX(snapCoord1.x), getHeight()));
- }
-#endif
- }
-#if 1
- if (snapCoord1.valid && snapCoord1 != snapSpot1)
+ // We have to traverse the container ourselves, because RS_Container::draw()
+ // uses drawEntity() instead of drawEntityPlain()...
+ for(RS_Entity * e=preview.firstEntity(RS2::ResolveNone); e!=NULL;
+ e = preview.nextEntity(RS2::ResolveNone))