mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1912 Curve Creator : Avoid selection in main project tree when clicking on curve
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimContextCommandBuilder.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
@@ -316,8 +317,6 @@ bool RiuSummaryQwtPlot::eventFilter(QObject* watched, QEvent* event)
|
||||
return QwtPlot::eventFilter(watched, event);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -345,7 +344,11 @@ void RiuSummaryQwtPlot::selectClosestCurve(const QPoint& pos)
|
||||
if(closestCurve && distMin < 20)
|
||||
{
|
||||
caf::PdmObject* selectedCurve = m_plotDefinition->findRimCurveFromQwtCurve(closestCurve);
|
||||
if(selectedCurve)
|
||||
|
||||
RimProject* proj = nullptr;
|
||||
selectedCurve->firstAncestorOrThisOfType(proj);
|
||||
|
||||
if(proj && selectedCurve)
|
||||
{
|
||||
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(selectedCurve);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user