mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#870 Detach plot marker when plot looses focus
This commit is contained in:
@@ -358,6 +358,19 @@ bool RiuSummaryQwtPlot::eventFilter(QObject* watched, QEvent* event)
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryQwtPlot::leaveEvent(QEvent *)
|
||||
{
|
||||
if (m_plotMarker->plot())
|
||||
{
|
||||
m_plotMarker->detach();
|
||||
|
||||
replot();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user