#870 Detach plot marker when plot looses focus

This commit is contained in:
Magne Sjaastad
2016-11-11 11:41:08 +01:00
parent 9594685980
commit 31b12999b5
2 changed files with 15 additions and 1 deletions

View File

@@ -358,6 +358,19 @@ bool RiuSummaryQwtPlot::eventFilter(QObject* watched, QEvent* event)
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuSummaryQwtPlot::leaveEvent(QEvent *)
{
if (m_plotMarker->plot())
{
m_plotMarker->detach();
replot();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -58,7 +58,8 @@ public:
void updateClosestCurvePointMarker(const QPointF& pos, int yAxis);
protected:
virtual bool eventFilter(QObject* watched, QEvent* event);
virtual bool eventFilter(QObject* watched, QEvent* event) override;
virtual void leaveEvent(QEvent *) override;
private:
void setDefaults();