From 8a253a4db1126782c11080924c4300220f3cb7be Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Wed, 14 Dec 2011 21:57:18 +1000 Subject: [PATCH] Selection time in status bar fix, removed duration from under overlay bars --- Graphs/gGraphView.cpp | 2 +- Graphs/gLineOverlay.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Graphs/gGraphView.cpp b/Graphs/gGraphView.cpp index acf00329..d5c53d7c 100644 --- a/Graphs/gGraphView.cpp +++ b/Graphs/gGraphView.cpp @@ -1208,7 +1208,7 @@ void gGraph::mouseMoveEvent(QMouseEvent * event) if (a2>w) a2=w; m_selecting_area=true; m_selection=QRect(a1-1,0,a2-a1,m_lastbounds.height()); - double w2=m_lastbounds.width(); //-(right+m_marginright)-(m_marginleft+left); + double w2=m_lastbounds.width()-right-left; //-(right+m_marginright)-(m_marginleft+left); if (m_blockzoom) { xmult=(rmax_x-rmin_x)/w2; } else xmult=(max_x-min_x)/w2; diff --git a/Graphs/gLineOverlay.cpp b/Graphs/gLineOverlay.cpp index 57dfdded..234f7fa1 100644 --- a/Graphs/gLineOverlay.cpp +++ b/Graphs/gLineOverlay.cpp @@ -116,9 +116,10 @@ void gLineOverlayBar::paint(gGraph & w, int left, int topp, int width, int heigh GetTextExtent(m_label,x,y); w.renderText(m_label,x1-(x/2),top-y+(3*w.printScaleY())); - QString a=QString::number(int(el.data(i))); - GetTextExtent(a,x,y); - w.renderText(a,x1-(x/2),bottom+y+(3*w.printScaleY())); + // The follow lines enable the duration display underneath +// QString a=QString::number(int(el.data(i))); +// GetTextExtent(a,x,y); +// w.renderText(a,x1-(x/2),bottom+y+(3*w.printScaleY())); } }