mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
#4574 Summary Plot: Do not modify highlight curve change when zooming
This commit is contained in:
parent
7295ba8533
commit
c78b435864
@ -174,7 +174,22 @@ bool RiuQwtPlot::eventFilter(QObject* watched, QEvent* event)
|
||||
{
|
||||
if(mouseEvent->button() == Qt::LeftButton && mouseEvent->type() == QMouseEvent::MouseButtonRelease)
|
||||
{
|
||||
selectClosestCurve(mouseEvent->pos());
|
||||
bool anyZoomingActive = false;
|
||||
|
||||
if (m_zoomerLeft && m_zoomerLeft->isActiveAndValid())
|
||||
{
|
||||
anyZoomingActive = true;
|
||||
}
|
||||
|
||||
if (m_zoomerRight && m_zoomerRight->isActiveAndValid())
|
||||
{
|
||||
anyZoomingActive = true;
|
||||
}
|
||||
|
||||
if (!anyZoomingActive)
|
||||
{
|
||||
selectClosestCurve(mouseEvent->pos());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,9 +28,10 @@
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
class RiuQwtPlotZoomer;
|
||||
|
||||
class QwtPlotCurve;
|
||||
class QwtPlotGrid;
|
||||
class QwtPlotZoomer;
|
||||
class QwtInterval;
|
||||
class QwtPicker;
|
||||
class QwtPlotMarker;
|
||||
@ -82,8 +83,8 @@ private:
|
||||
};
|
||||
caf::PdmPointer<RimViewWindow> m_ownerViewWindow;
|
||||
|
||||
QPointer<QwtPlotZoomer> m_zoomerLeft;
|
||||
QPointer<QwtPlotZoomer> m_zoomerRight;
|
||||
QPointer<RiuQwtPlotZoomer> m_zoomerLeft;
|
||||
QPointer<RiuQwtPlotZoomer> m_zoomerRight;
|
||||
|
||||
std::map<QwtPlotCurve*, CurveColors> m_originalCurveColors;
|
||||
std::map<QwtPlotCurve*, double> m_originalZValues;
|
||||
|
@ -27,6 +27,14 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
bool isActiveAndValid() const
|
||||
{
|
||||
if (!isActive()) return false;
|
||||
|
||||
auto currentSelection = selection();
|
||||
return accept(currentSelection);
|
||||
}
|
||||
|
||||
protected:
|
||||
QSizeF minZoomSize() const override
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user