#2319 PLT/Well log plot: Remove auto scale on scroll. Make auto scale from file work

This commit is contained in:
Rebecca Cox 2018-01-29 10:17:38 +01:00
parent 0171589c72
commit b7a316589a
3 changed files with 23 additions and 7 deletions

View File

@ -147,6 +147,14 @@ void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
{ {
rftPlot->updateConnectedEditors(); 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; double newMaximum = zoomCenter + (m_maxVisibleDepth - zoomCenter)*zoomFactor;
setDepthZoomMinMax(newMinimum, newMaximum); setDepthZoomMinMax(newMinimum, newMaximum);
setDepthAutoZoom(false);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -303,6 +312,7 @@ void RimWellLogPlot::panDepth(double panFactor)
{ {
double delta = panFactor*(m_maxVisibleDepth - m_minVisibleDepth); double delta = panFactor*(m_maxVisibleDepth - m_minVisibleDepth);
setDepthZoomMinMax(m_minVisibleDepth + delta, m_maxVisibleDepth + delta); setDepthZoomMinMax(m_minVisibleDepth + delta, m_maxVisibleDepth + delta);
setDepthAutoZoom(false);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -383,9 +393,7 @@ bool RimWellLogPlot::hasAvailableDepthRange() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlot::zoomAll() void RimWellLogPlot::zoomAll()
{ {
m_isAutoScaleDepthEnabled = true; setDepthAutoZoom(true);
m_isAutoScaleDepthEnabled.uiCapability()->updateConnectedEditors();
updateDepthZoom(); updateDepthZoom();
} }
@ -397,6 +405,15 @@ QWidget* RimWellLogPlot::viewWidget()
return m_viewer; return m_viewer;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlot::setDepthAutoZoom(bool on)
{
m_isAutoScaleDepthEnabled = on;
m_isAutoScaleDepthEnabled.uiCapability()->updateConnectedEditors();
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -594,11 +611,7 @@ void RimWellLogPlot::onLoadDataAndUpdate()
{ {
updateMdiWindowVisibility(); updateMdiWindowVisibility();
bool tempAutoScale = m_isAutoScaleDepthEnabled;
m_isAutoScaleDepthEnabled = false;
updateTracks(); updateTracks();
m_isAutoScaleDepthEnabled = tempAutoScale;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -99,6 +99,8 @@ public:
virtual void zoomAll() override; virtual void zoomAll() override;
virtual QWidget* viewWidget() override; virtual QWidget* viewWidget() override;
void setDepthAutoZoom(bool on);
QString asciiDataForPlotExport() const; QString asciiDataForPlotExport() const;

View File

@ -264,6 +264,7 @@ void RiuWellLogPlot::slotSetMinDepth(int value)
double delta = value - minimumDepth; double delta = value - minimumDepth;
m_plotDefinition->setDepthZoomMinMax(minimumDepth + delta, maximumDepth + delta); m_plotDefinition->setDepthZoomMinMax(minimumDepth + delta, maximumDepth + delta);
m_plotDefinition->setDepthAutoZoom(false);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------