src/gldraw.cpp

changeset 510
ee90c55dfeef
parent 507
fc76d38c3530
child 511
c3787dbd6315
equal deleted inserted replaced
509:dcacfd2cd81b 510:ee90c55dfeef
105 m_camera = (GL::Camera) gl_camera.value; 105 m_camera = (GL::Camera) gl_camera.value;
106 m_drawToolTip = false; 106 m_drawToolTip = false;
107 m_editMode = Select; 107 m_editMode = Select;
108 m_rectdraw = false; 108 m_rectdraw = false;
109 m_panning = false; 109 m_panning = false;
110 m_firstResize = true;
110 setFile (null); 111 setFile (null);
111 setDrawOnly (false); 112 setDrawOnly (false);
112 resetAngles();
113 setMessageLog (null); 113 setMessageLog (null);
114 114
115 m_toolTipTimer = new QTimer (this); 115 m_toolTipTimer = new QTimer (this);
116 m_toolTipTimer->setSingleShot (true); 116 m_toolTipTimer->setSingleShot (true);
117 connect (m_toolTipTimer, SIGNAL (timeout()), this, SLOT (slot_toolTipTimer())); 117 connect (m_toolTipTimer, SIGNAL (timeout()), this, SLOT (slot_toolTipTimer()));
348 // ============================================================================= 348 // =============================================================================
349 // ----------------------------------------------------------------------------- 349 // -----------------------------------------------------------------------------
350 void GLRenderer::resizeGL (int w, int h) 350 void GLRenderer::resizeGL (int w, int h)
351 { m_width = w; 351 { m_width = w;
352 m_height = h; 352 m_height = h;
353
354 // If this is the first call to resizeGL, reset the angles. We cannot call
355 // resetAngles() in the initializer because it does not know m_width or m_height,
356 // which zoomToFit() must know.
357 if (m_firstResize)
358 { m_firstResize = false;
359 resetAngles();
360 }
353 361
354 calcCameraIcons(); 362 calcCameraIcons();
355 363
356 glViewport (0, 0, w, h); 364 glViewport (0, 0, w, h);
357 glMatrixMode (GL_PROJECTION); 365 glMatrixMode (GL_PROJECTION);

mercurial