Forcibly show the current group once we start a drawing operation
This commit is contained in:
parent
bfef091ac9
commit
0b997e4c17
|
@ -906,7 +906,8 @@ void GraphicsWindow::MouseLeftDown(double mx, double my) {
|
||||||
v = v.Plus(projRight.ScaledBy(mx/scale));
|
v = v.Plus(projRight.ScaledBy(mx/scale));
|
||||||
v = v.Plus(projUp.ScaledBy(my/scale));
|
v = v.Plus(projUp.ScaledBy(my/scale));
|
||||||
|
|
||||||
hRequest hr;
|
hRequest hr = {};
|
||||||
|
hConstraint hc = {};
|
||||||
switch(pending.operation) {
|
switch(pending.operation) {
|
||||||
case MNU_DATUM_POINT:
|
case MNU_DATUM_POINT:
|
||||||
hr = AddRequest(Request::DATUM_POINT);
|
hr = AddRequest(Request::DATUM_POINT);
|
||||||
|
@ -961,6 +962,7 @@ void GraphicsWindow::MouseLeftDown(double mx, double my) {
|
||||||
pending.operation = DRAGGING_NEW_POINT;
|
pending.operation = DRAGGING_NEW_POINT;
|
||||||
pending.point = lns[1].entity(2);
|
pending.point = lns[1].entity(2);
|
||||||
pending.description = "click to place other corner of rectangle";
|
pending.description = "click to place other corner of rectangle";
|
||||||
|
hr = lns[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MNU_CIRCLE:
|
case MNU_CIRCLE:
|
||||||
|
@ -1063,7 +1065,7 @@ void GraphicsWindow::MouseLeftDown(double mx, double my) {
|
||||||
c.type = Constraint::COMMENT;
|
c.type = Constraint::COMMENT;
|
||||||
c.disp.offset = v;
|
c.disp.offset = v;
|
||||||
c.comment = "NEW COMMENT -- DOUBLE-CLICK TO EDIT";
|
c.comment = "NEW COMMENT -- DOUBLE-CLICK TO EDIT";
|
||||||
Constraint::AddConstraint(&c);
|
hc = Constraint::AddConstraint(&c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1188,6 +1190,20 @@ void GraphicsWindow::MouseLeftDown(double mx, double my) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Activate group with newly created request/constraint
|
||||||
|
Group *g = NULL;
|
||||||
|
if(hr.v != 0) {
|
||||||
|
Request *req = SK.GetRequest(hr);
|
||||||
|
g = SK.GetGroup(req->group);
|
||||||
|
}
|
||||||
|
if(hc.v != 0) {
|
||||||
|
Constraint *c = SK.GetConstraint(hc);
|
||||||
|
g = SK.GetGroup(c->group);
|
||||||
|
}
|
||||||
|
if(g != NULL) {
|
||||||
|
g->visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
SS.ScheduleShowTW();
|
SS.ScheduleShowTW();
|
||||||
InvalidateGraphics();
|
InvalidateGraphics();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user