--- a/src/gldraw.cpp Wed Jul 03 00:43:27 2013 +0300 +++ b/src/gldraw.cpp Thu Jul 04 03:05:39 2013 +0300 @@ -35,6 +35,7 @@ #include "history.h" #include "dialogs.h" #include "addObjectDialog.h" +#include "msglog.h" static const struct staticCameraMeta { const char glrotate[3]; @@ -102,6 +103,7 @@ setFile (null); setDrawOnly (false); resetAngles (); + setMessageLog( null ); m_toolTipTimer = new QTimer (this); m_toolTipTimer->setSingleShot (true); @@ -604,7 +606,7 @@ str label; label = fmt( fmtstr, tr( g_CameraNames[camera ()] )); paint.setPen (m_darkbg ? Qt::white : Qt::black); - paint.drawText (QPoint (margin, margin + metrics.ascent ()), label); + paint.drawText( QPoint( margin, height() - ( margin + metrics.descent() )), label ); } // Tool tips @@ -644,6 +646,24 @@ } } + // Message log + if( msglog() ) + { + MessageManager* m = msglog(); + int y = 0; + const int margin = 2; + QColor col = Qt::black; + paint.setPen( QPen() ); + + for( const MessageManager::Line& line : *m ) + { + col.setAlphaF( line.alpha ); + paint.setPen( QPen( col )); + paint.drawText( QPoint( margin, y + margin + metrics.ascent() ), line.text ); + y += metrics.height(); + } + } + // If we're range-picking, draw a rectangle encompassing the selection area. if (m_rangepick && !m_picking && m_totalmove >= 10) { const short x0 = m_rangeStart.x (), @@ -1180,6 +1200,7 @@ case Select: unsetCursor (); setContextMenuPolicy (Qt::DefaultContextMenu); + log( "Changed to Select mode." ); break; case Draw: @@ -1199,6 +1220,7 @@ g_win->sel ().clear (); g_win->updateSelection (); m_drawedVerts.clear (); + log( "Changed to Draw mode." ); break; }