diff -r dcacfd2cd81b -r ee90c55dfeef src/gldraw.cpp --- a/src/gldraw.cpp Fri Oct 18 17:47:05 2013 +0300 +++ b/src/gldraw.cpp Fri Oct 18 17:57:42 2013 +0300 @@ -107,9 +107,9 @@ m_editMode = Select; m_rectdraw = false; m_panning = false; + m_firstResize = true; setFile (null); setDrawOnly (false); - resetAngles(); setMessageLog (null); m_toolTipTimer = new QTimer (this); @@ -351,6 +351,14 @@ { m_width = w; m_height = h; + // If this is the first call to resizeGL, reset the angles. We cannot call + // resetAngles() in the initializer because it does not know m_width or m_height, + // which zoomToFit() must know. + if (m_firstResize) + { m_firstResize = false; + resetAngles(); + } + calcCameraIcons(); glViewport (0, 0, w, h);