From 056d3bfa3077f5f0e3ef00f9b56d26a9706c155c Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 24 Apr 2016 22:38:02 +0000 Subject: [PATCH] Properly fix workplane name overlapping workplane border. A previous attempt to fix this was done in 0128b8679. However, it was not rigorous. The added offset was dependent on font size and it introduced an error into edit control positioning. Further, it is irrelevant to non-workplanes. After this commit, the workplane drawing code adds a fixed offset instead. Also, the "tab" is enlarged to not overlap with #XY etc. --- src/drawentity.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/drawentity.cpp b/src/drawentity.cpp index 9efe7dc..39bc085 100644 --- a/src/drawentity.cpp +++ b/src/drawentity.cpp @@ -661,8 +661,8 @@ void Entity::DrawOrGetDistance(void) { } if(!h.isFromRequest()) { - mm = mm.Plus(v.ScaledBy(60/SS.GW.scale)); - mm2 = mm2.Plus(u.ScaledBy(60/SS.GW.scale)); + mm = mm.Plus(v.ScaledBy(70/SS.GW.scale)); + mm2 = mm2.Plus(u.ScaledBy(70/SS.GW.scale)); LineDrawOrGetDistance(mm2, mm); } LineDrawOrGetDistance(pp, pm); @@ -676,7 +676,9 @@ void Entity::DrawOrGetDistance(void) { std::string str = DescriptionString().substr(5); double th = Style::DefaultTextHeight(); if(dogd.drawing) { - ssglWriteText(str, th, mm2, u, v, NULL, NULL); + Vector o = mm2.Plus(u.ScaledBy(3/SS.GW.scale)).Plus( + v.ScaledBy(3/SS.GW.scale)); + ssglWriteText(str, th, o, u, v, NULL, NULL); } else { Vector pos = mm2.Plus(u.ScaledBy(ssglStrWidth(str, th)/2)).Plus( v.ScaledBy(ssglStrCapHeight(th)/2));