From ad5e18afa674b4dc39719d3795ff7152895beb48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Wed, 15 Feb 2017 10:35:54 +0100 Subject: [PATCH] #1226 Show the complete text in the summary plot tooltip text --- ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp b/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp index c5a9918c39..40128424ea 100644 --- a/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp +++ b/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp @@ -258,7 +258,14 @@ QPointF RiuSummaryQwtPlot::closestCurvePoint(const QPoint& cursorPosition, QStri if (timeString) { const QwtScaleDraw* timeAxisScaleDraw = axisScaleDraw(QwtPlot::xBottom); - if (timeAxisScaleDraw) + auto dateScaleDraw = dynamic_cast(timeAxisScaleDraw) ; + + if (dateScaleDraw) + { + QDateTime date = dateScaleDraw->toDateTime(samplePoint.x()); + *timeString = date.toString("hh:mm dd.MMMM.yyyy"); + } + else if (timeAxisScaleDraw) { *timeString = timeAxisScaleDraw->label(samplePoint.x()).text(); }