mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2319 PLT/Well log plot: Remove auto scale on scroll. Make auto scale from file work
This commit is contained in:
parent
0171589c72
commit
b7a316589a
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user