Sun, 27 Apr 2014 04:15:25 +0300
- resetAngles still needs to request a zoom to fit or the ctrl-0 action doesn't zoom to fit
src/glRenderer.cc | file | annotate | diff | comparison | revisions | |
src/glRenderer.h | file | annotate | diff | comparison | revisions |
--- a/src/glRenderer.cc Sun Apr 27 04:06:46 2014 +0300 +++ b/src/glRenderer.cc Sun Apr 27 04:15:25 2014 +0300 @@ -224,11 +224,20 @@ // ============================================================================= // +void GLRenderer::needZoomToFit() +{ + if (document() != null) + currentDocumentData().needZoomToFit = true; +} + +// ============================================================================= +// void GLRenderer::resetAngles() { rot (X) = 30.0f; rot (Y) = 325.f; pan (X) = pan (Y) = rot (Z) = 0.0f; + needZoomToFit(); } // =============================================================================
--- a/src/glRenderer.h Sun Apr 27 04:06:46 2014 +0300 +++ b/src/glRenderer.h Sun Apr 27 04:15:25 2014 +0300 @@ -171,6 +171,7 @@ void hardRefresh(); void initGLData(); void initOverlaysFromObjects(); + void needZoomToFit(); void refresh(); void resetAngles(); void resetAllAngles(); @@ -180,8 +181,6 @@ bool setupOverlay (EFixedCamera cam, QString file, int x, int y, int w, int h); void updateOverlayObjects(); void zoomNotch (bool inward); - void zoomToFit(); - void zoomAllToFit(); static void deleteLists (LDObject* obj); static QColor getMainColor(); @@ -272,6 +271,8 @@ // Set the color to an object list void setObjectColor (LDObject* obj, const ListType list); + void zoomToFit(); + void zoomAllToFit(); LDGLData& currentDocumentData() const {