Sat, 21 Dec 2013 02:19:32 +0200
- fixed configuration dialog not accepting values past 99.99 for grid angles
- fixed file loader figuring that a 4-4cyli.dat in a folder called "48" can be used as 4-4cyli.dat. s/ and 48/ folders now checked properly
changelog.txt | file | annotate | diff | comparison | revisions | |
src/configDialog.cc | file | annotate | diff | comparison | revisions | |
src/document.cc | file | annotate | diff | comparison | revisions | |
src/gldraw.cc | file | annotate | diff | comparison | revisions | |
src/gui_editactions.cc | file | annotate | diff | comparison | revisions |
--- a/changelog.txt Fri Dec 20 18:22:24 2013 +0200 +++ b/changelog.txt Sat Dec 21 02:19:32 2013 +0200 @@ -38,6 +38,7 @@ - Added support for '0 BFC CLIP' and '0 BFC NOCLIP' and added auto-correction from errorneous MLCAD syntax ('0 BFC CERTIFY CLIP'). - Increased the amount of recent file slots from 5 to 10. +- Fixed: Configuration window did not allow for grid angle values higher than 99.99 - The viewport now uses 7 sets of rotation/pan/zoom values, one for each camera. Changing these values in one camera no longer affects other cameras. - When an external program is attempted to be used without a binary path defined, one will be asked
--- a/src/configDialog.cc Fri Dec 20 18:22:24 2013 +0200 +++ b/src/configDialog.cc Sat Dec 21 02:19:32 2013 +0200 @@ -218,6 +218,11 @@ // Add the widgets for (int j = 0; j < 4; ++j) { dsb_gridData[i][j] = new QDoubleSpinBox; + + // Set the maximum angle + if (j == 3) + dsb_gridData[i][j]->setMaximum (360); + dsb_gridData[i][j]->setValue (g_GridInfo[i].confs[j]->value); gridlayout->addWidget (dsb_gridData[i][j], i + 1, j + 1); }
--- a/src/document.cc Fri Dec 20 18:22:24 2013 +0200 +++ b/src/document.cc Sat Dec 21 02:19:32 2013 +0200 @@ -223,6 +223,7 @@ // Try find it relative to other currently open documents. We want a file // in the immediate vicinity of a current model to override stock LDraw stuff. + str reltop = basename (dirname (relpath)); for (LDDocument* doc : g_loadedFiles) { if (doc->getFullPath().isEmpty()) continue; @@ -230,7 +231,17 @@ str partpath = fmt ("%1/%2", dirname (doc->getFullPath()), relpath); if (f->open (partpath, File::Read)) - return f; + { // ensure we don't mix subfiles and 48-primitives with non-subfiles and non-48 + str proptop = basename (dirname (partpath)); + + bool bogus = (proptop == "s" && reltop != "s") || + (proptop == "48" && reltop != "48") || + (reltop == "s" && proptop != "s") || + (reltop == "48" && proptop != "48"); + + if (!bogus) + return f; + } } if (f->open (relpath, File::Read))
--- a/src/gldraw.cc Fri Dec 20 18:22:24 2013 +0200 +++ b/src/gldraw.cc Sat Dec 21 02:19:32 2013 +0200 @@ -649,10 +649,16 @@ if (gl_drawangles) { QLineF l0 (poly[h], poly[i]), l1 (poly[i], poly[j]); + double angle = 180 - l0.angleTo (l1); + + if (angle < 0) + angle = 180 - l1.angleTo (l0); + str label = str::number (angle) + str::fromUtf8 (QByteArray ("\302\260")); QPoint pos = poly[i]; pos.setY (pos.y() + metrics.height()); + paint.drawText (pos, label); } }
--- a/src/gui_editactions.cc Fri Dec 20 18:22:24 2013 +0200 +++ b/src/gui_editactions.cc Sat Dec 21 02:19:32 2013 +0200 @@ -454,9 +454,11 @@ { LDMatrixObject* mo = dynamic_cast<LDMatrixObject*> (obj); // Transform the position + /* vertex v = mo->getPosition(); rotateVertex (v, rotpoint, transform); mo->setPosition (v); + */ // Transform the matrix mo->setTransform (mo->getTransform() * transform);