Instead of a "force parallel projection" menu item that's on by
default, let's do a "use perspective projection" item that's off by default. Same meaning, but less confusion. [git-p4: depot-paths = "//depot/solvespace/": change = 2132]
This commit is contained in:
parent
0246add3e9
commit
01ecb986f4
@ -346,9 +346,9 @@ bool TextWindow::EditControlDoneForConfiguration(char *s) {
|
||||
}
|
||||
case EDIT_CAMERA_TANGENT: {
|
||||
SS.cameraTangent = (min(2, max(0, atof(s))))/1000.0;
|
||||
if(SS.forceParallelProj) {
|
||||
if(!SS.usePerspectiveProj) {
|
||||
Message("The perspective factor will have no effect until you "
|
||||
"disable View -> Force Parallel Projection.");
|
||||
"enable View -> Use Perspective Projection.");
|
||||
}
|
||||
InvalidateGraphics();
|
||||
break;
|
||||
|
@ -58,7 +58,7 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = {
|
||||
{ 1, "&Center View At Point\tF4", MNU_CENTER_VIEW, F(4), mView },
|
||||
{ 1, NULL, 0, NULL },
|
||||
{ 1, "Show Snap &Grid\t>", MNU_SHOW_GRID, '.'|S, mView },
|
||||
{ 1, "Force &Parallel Projection\t`", MNU_PARALLEL_PROJ, '`', mView },
|
||||
{ 1, "Use &Perspective Projection\t`", MNU_PERSPECTIVE_PROJ,'`', mView },
|
||||
{ 1, NULL, 0, NULL },
|
||||
{ 1, "Show Text &Window\tTab", MNU_SHOW_TEXT_WND, '\t', mView },
|
||||
{ 1, "Show &Toolbar", MNU_SHOW_TOOLBAR, 0, mView },
|
||||
@ -361,8 +361,8 @@ void GraphicsWindow::MenuView(int id) {
|
||||
InvalidateGraphics();
|
||||
break;
|
||||
|
||||
case MNU_PARALLEL_PROJ:
|
||||
SS.forceParallelProj = !SS.forceParallelProj;
|
||||
case MNU_PERSPECTIVE_PROJ:
|
||||
SS.usePerspectiveProj = !SS.usePerspectiveProj;
|
||||
if(SS.cameraTangent < 1e-6) {
|
||||
Error("The perspective factor is set to zero, so the view will "
|
||||
"always be a parallel projection.\n\n"
|
||||
@ -547,7 +547,7 @@ void GraphicsWindow::EnsureValidActives(void) {
|
||||
CheckMenuById(MNU_SHOW_TEXT_WND, SS.GW.showTextWindow);
|
||||
|
||||
CheckMenuById(MNU_SHOW_TOOLBAR, SS.showToolbar);
|
||||
CheckMenuById(MNU_PARALLEL_PROJ, SS.forceParallelProj);
|
||||
CheckMenuById(MNU_PERSPECTIVE_PROJ, SS.usePerspectiveProj);
|
||||
CheckMenuById(MNU_SHOW_GRID, SS.GW.showSnapGrid);
|
||||
|
||||
if(change) SS.later.showTW = true;
|
||||
|
@ -114,10 +114,6 @@ void SolveSpace::Init(char *cmdLine) {
|
||||
// configuration file, but we will automatically load those as we need
|
||||
// them.
|
||||
|
||||
// The factory default settings include a non-zero perspective factor,
|
||||
// but we'll default to that off.
|
||||
forceParallelProj = true;
|
||||
|
||||
// Start with either an empty file, or the file specified on the
|
||||
// command line.
|
||||
NewFile();
|
||||
@ -253,7 +249,7 @@ double SolveSpace::ChordTolMm(void) {
|
||||
}
|
||||
|
||||
double SolveSpace::CameraTangent(void) {
|
||||
if(forceParallelProj) {
|
||||
if(!usePerspectiveProj) {
|
||||
return 0;
|
||||
} else {
|
||||
return cameraTangent;
|
||||
|
@ -649,7 +649,7 @@ public:
|
||||
char *UnitName(void);
|
||||
double MmPerUnit(void);
|
||||
double ChordTolMm(void);
|
||||
bool forceParallelProj;
|
||||
bool usePerspectiveProj;
|
||||
double CameraTangent(void);
|
||||
|
||||
// The platform-dependent code calls this before entering the msg loop
|
||||
|
Loading…
Reference in New Issue
Block a user