mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge remote-tracking branch 'origin/2018.01.01-patch' into dev
This commit is contained in:
commit
a1f969fc11
@ -135,7 +135,7 @@ void RimPlotCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, con
|
||||
{
|
||||
if (changedField == &m_showCurve)
|
||||
{
|
||||
this->updateCurveVisibility();
|
||||
this->updateCurveVisibility(true);
|
||||
if (m_showCurve()) loadDataAndUpdate(true);
|
||||
}
|
||||
else if (changedField == &m_curveName)
|
||||
@ -180,7 +180,7 @@ caf::PdmFieldHandle* RimPlotCurve::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::updateCurveVisibility()
|
||||
void RimPlotCurve::updateCurveVisibility(bool updateParent)
|
||||
{
|
||||
bool isVisibleInPossibleParent = true;
|
||||
|
||||
@ -199,7 +199,10 @@ void RimPlotCurve::updateCurveVisibility()
|
||||
m_qwtPlotCurve->detach();
|
||||
}
|
||||
|
||||
updateZoomInParentPlot();
|
||||
if (updateParent)
|
||||
{
|
||||
updateZoomInParentPlot();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -207,7 +210,7 @@ void RimPlotCurve::updateCurveVisibility()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::updateCurvePresentation(bool updatePlotLegend)
|
||||
{
|
||||
this->updateCurveVisibility();
|
||||
this->updateCurveVisibility(updatePlotLegend);
|
||||
|
||||
if (updatePlotLegend)
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ public:
|
||||
|
||||
QString curveName() const { return m_curveName; }
|
||||
|
||||
void updateCurveVisibility();
|
||||
void updateCurveVisibility(bool updateParent);
|
||||
void updateLegendEntryVisibilityAndPlotLegend();
|
||||
void updateLegendEntryVisibilityNoPlotUpdate();
|
||||
|
||||
|
@ -147,6 +147,14 @@ void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
{
|
||||
rftPlot->updateConnectedEditors();
|
||||
}
|
||||
|
||||
RimWellPltPlot* pltPlot(nullptr);
|
||||
this->firstAncestorOrThisOfType(pltPlot);
|
||||
|
||||
if (pltPlot)
|
||||
{
|
||||
pltPlot->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -294,6 +302,7 @@ void RimWellLogPlot::setDepthZoomByFactorAndCenter(double zoomFactor, double zoo
|
||||
double newMaximum = zoomCenter + (m_maxVisibleDepth - zoomCenter)*zoomFactor;
|
||||
|
||||
setDepthZoomMinMax(newMinimum, newMaximum);
|
||||
setDepthAutoZoom(false);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -303,6 +312,7 @@ void RimWellLogPlot::panDepth(double panFactor)
|
||||
{
|
||||
double delta = panFactor*(m_maxVisibleDepth - m_minVisibleDepth);
|
||||
setDepthZoomMinMax(m_minVisibleDepth + delta, m_maxVisibleDepth + delta);
|
||||
setDepthAutoZoom(false);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -383,9 +393,7 @@ bool RimWellLogPlot::hasAvailableDepthRange() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlot::zoomAll()
|
||||
{
|
||||
m_isAutoScaleDepthEnabled = true;
|
||||
m_isAutoScaleDepthEnabled.uiCapability()->updateConnectedEditors();
|
||||
|
||||
setDepthAutoZoom(true);
|
||||
updateDepthZoom();
|
||||
}
|
||||
|
||||
@ -397,6 +405,15 @@ QWidget* RimWellLogPlot::viewWidget()
|
||||
return m_viewer;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlot::setDepthAutoZoom(bool on)
|
||||
{
|
||||
m_isAutoScaleDepthEnabled = on;
|
||||
m_isAutoScaleDepthEnabled.uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -594,11 +611,7 @@ void RimWellLogPlot::onLoadDataAndUpdate()
|
||||
{
|
||||
updateMdiWindowVisibility();
|
||||
|
||||
bool tempAutoScale = m_isAutoScaleDepthEnabled;
|
||||
m_isAutoScaleDepthEnabled = false;
|
||||
updateTracks();
|
||||
|
||||
m_isAutoScaleDepthEnabled = tempAutoScale;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -99,6 +99,8 @@ public:
|
||||
|
||||
virtual void zoomAll() override;
|
||||
virtual QWidget* viewWidget() override;
|
||||
void setDepthAutoZoom(bool on);
|
||||
|
||||
|
||||
QString asciiDataForPlotExport() const;
|
||||
|
||||
|
@ -264,6 +264,7 @@ void RiuWellLogPlot::slotSetMinDepth(int value)
|
||||
|
||||
double delta = value - minimumDepth;
|
||||
m_plotDefinition->setDepthZoomMinMax(minimumDepth + delta, maximumDepth + delta);
|
||||
m_plotDefinition->setDepthAutoZoom(false);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user