(#504) Do not use autoscale for x-axis - simplified track/plot update code

This commit is contained in:
Magne Sjaastad
2015-09-22 11:54:58 +02:00
parent 7ded798055
commit b45e571888
8 changed files with 51 additions and 93 deletions

View File

@@ -131,44 +131,13 @@ void RimWellLogFileCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
{
RimWellLogPlotCurve::fieldChangedByUi(changedField, oldValue, newValue);
RimWellLogPlot* wellLoglot;
firstAnchestorOrThisOfType(wellLoglot);
RimWellLogPlotTrack* wellLoglotTrack;
firstAnchestorOrThisOfType(wellLoglotTrack);
if (changedField == &m_wellPath)
{
this->updatePlotData();
if (wellLoglot)
{
wellLoglot->updateAvailableDepthRange();
wellLoglot->setVisibleDepthRangeFromContents();
}
if (wellLoglotTrack)
{
wellLoglotTrack->updateXAxisRangeFromCurves();
}
}
else if (changedField == &m_wellLogChannnelName)
{
this->updatePlotData();
if (wellLoglot)
{
if (!wellLoglot->hasAvailableDepthRange())
{
wellLoglot->updateAvailableDepthRange();
wellLoglot->setVisibleDepthRangeFromContents();
}
if (wellLoglotTrack)
{
wellLoglotTrack->updateXAxisRangeFromCurves();
}
}
}
m_plot->replot();