diff --git a/entity.cpp b/entity.cpp index f85a5018..7673437a 100644 --- a/entity.cpp +++ b/entity.cpp @@ -580,6 +580,8 @@ void Entity::DrawOrGetDistance(int order) { // contribute a distance for the selection, but it still generates edges. if(!(g->visible) && !dogd.edges) return; + glLineWidth(1.5); + if(group.v != SS.GW.activeGroup.v) { glxColor3d(0.5, 0.3, 0.0); } else if(construction) { @@ -607,7 +609,7 @@ void Entity::DrawOrGetDistance(int order) { Vector v = PointGetNum(); if(dogd.drawing) { - double s = 3; + double s = 3.5; Vector r = SS.GW.projRight.ScaledBy(s/SS.GW.scale); Vector d = SS.GW.projUp.ScaledBy(s/SS.GW.scale); @@ -655,6 +657,7 @@ void Entity::DrawOrGetDistance(int order) { Vector tail; if(i == 0) { tail = SS.GetEntity(point[0])->PointGetNum(); + glLineWidth(1); } else { // Draw an extra copy of the x, y, and z axes, that's // always in the corner of the view and at the front. @@ -713,6 +716,7 @@ void Entity::DrawOrGetDistance(int order) { Vector mm = p.Minus(us).Minus(vs), mm2 = mm; Vector mp = p.Minus(us).Plus (vs); + glLineWidth(1); glxColor3d(0, 0.3, 0.3); glEnable(GL_LINE_STIPPLE); glLineStipple(3, 0x1111); @@ -827,6 +831,8 @@ void Entity::DrawOrGetDistance(int order) { default: oops(); } + + glLineWidth(1); } void Entity::AddEq(IdList *l, Expr *expr, int index) { diff --git a/graphicswin.cpp b/graphicswin.cpp index 603e8906..4131bdbb 100644 --- a/graphicswin.cpp +++ b/graphicswin.cpp @@ -117,7 +117,7 @@ void GraphicsWindow::Init(void) { showConstraints = true; showHdnLines = false; showShaded = true; - showMesh = true; + showMesh = false; solving = SOLVE_ALWAYS; @@ -313,6 +313,10 @@ void GraphicsWindow::GeneratePerSolving(void) { void GraphicsWindow::MenuEdit(int id) { switch(id) { case MNU_UNSELECT_ALL: + SS.GW.GroupSelection(); + if(SS.GW.gs.n == 0 && SS.GW.pending.operation == 0) { + SS.TW.ClearSuper(); + } SS.GW.ClearSuper(); HideTextEditControl(); break; @@ -850,11 +854,6 @@ bool GraphicsWindow::ConstrainPointByHovered(hEntity pt) { Constraint::ConstrainCoincident(e->h, pt); return true; } - if(e->IsWorkplane()) { - Constraint::Constrain(Constraint::PT_IN_PLANE, - pt, Entity::NO_ENTITY, e->h); - return true; - } if(e->IsCircle()) { Constraint::Constrain(Constraint::PT_ON_CIRCLE, pt, Entity::NO_ENTITY, e->h); @@ -1079,13 +1078,13 @@ void GraphicsWindow::MouseLeftDoubleClick(double mx, double my) { if(GraphicsEditControlIsVisible()) return; if(hover.constraint.v) { - Constraint *c = SS.GetConstraint(hover.constraint); + constraintBeingEdited = hover.constraint; + ClearSuper(); + + Constraint *c = SS.GetConstraint(constraintBeingEdited); Vector p3 = c->GetLabelPos(); Point2d p2 = ProjectPoint(p3); ShowGraphicsEditControl((int)p2.x, (int)p2.y, c->exprA->Print()); - constraintBeingEdited = hover.constraint; - - ClearSuper(); } } @@ -1151,7 +1150,7 @@ void GraphicsWindow::Paint(int w, int h) { glMatrixMode(GL_PROJECTION); glLoadIdentity(); - glScaled(scale*2.0/w, scale*2.0/h, scale*1.0/100000); + glScaled(scale*2.0/w, scale*2.0/h, scale*1.0/30000); double tx = projRight.Dot(offset); double ty = projUp.Dot(offset); diff --git a/textwin.cpp b/textwin.cpp index f87757f2..e1e7bcb5 100644 --- a/textwin.cpp +++ b/textwin.cpp @@ -39,7 +39,7 @@ void TextWindow::ClearSuper(void) { modelColor[3] = RGB(150, 0, 0); modelColor[4] = RGB( 0, 100, 0); modelColor[5] = RGB( 0, 80, 80); - modelColor[6] = RGB( 0, 0, 150); + modelColor[6] = RGB( 0, 0, 130); modelColor[7] = RGB( 80, 0, 80); }