new helper methods
improved elememt-selection changed some parameters show length for selected obstacles/doors minor fixes
This commit is contained in:
@@ -27,7 +27,7 @@ public:
|
||||
}
|
||||
|
||||
/** get the element's minimal distance (nearest whatsoever) to the given point */
|
||||
float getMinDistanceXY(const Point2 p) const override {
|
||||
ClickDist getMinDistanceXY(const Point2 p) const override {
|
||||
return MapElementHelper::getLineDistanceXY(fo->from, fo->to, p);
|
||||
}
|
||||
|
||||
@@ -69,6 +69,12 @@ public:
|
||||
p.drawCircle(fo->to);
|
||||
}
|
||||
|
||||
// obstacle length
|
||||
if (hasFocus()) {
|
||||
p.setPenBrush(Qt::black, Qt::NoBrush);
|
||||
p.drawLength(fo->from, fo->to, fo->from.getDistance(fo->to));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user