Make "Align view onto workplane" switch to locked workplane, if any.
Original patch by yugami (http://solvespace.com/forum.pl?action=viewthread&parent=508).pull/3/head
parent
636b20bfa9
commit
d585f0d1ff
|
@ -446,15 +446,12 @@ void GraphicsWindow::MenuView(int id) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MNU_ONTO_WORKPLANE:
|
case MNU_ONTO_WORKPLANE:
|
||||||
if(!SS.GW.LockedInWorkplane()) {
|
if(SS.GW.LockedInWorkplane()) {
|
||||||
Error("No workplane is active.");
|
SS.GW.AnimateOntoWorkplane();
|
||||||
|
SS.GW.ClearSuper();
|
||||||
|
SS.ScheduleShowTW();
|
||||||
break;
|
break;
|
||||||
}
|
} // if not in 2d mode fall through and use ORTHO logic
|
||||||
SS.GW.AnimateOntoWorkplane();
|
|
||||||
SS.GW.ClearSuper();
|
|
||||||
SS.ScheduleShowTW();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MNU_NEAREST_ORTHO:
|
case MNU_NEAREST_ORTHO:
|
||||||
case MNU_NEAREST_ISO: {
|
case MNU_NEAREST_ISO: {
|
||||||
static const Vector ortho[3] = {
|
static const Vector ortho[3] = {
|
||||||
|
@ -480,7 +477,7 @@ void GraphicsWindow::MenuView(int id) {
|
||||||
Vector on = ou.Cross(ov);
|
Vector on = ou.Cross(ov);
|
||||||
|
|
||||||
Vector u, v;
|
Vector u, v;
|
||||||
if(id == MNU_NEAREST_ORTHO) {
|
if(id == MNU_NEAREST_ORTHO || id == MNU_ONTO_WORKPLANE) {
|
||||||
u = ou;
|
u = ou;
|
||||||
v = ov;
|
v = ov;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue