mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#592) Fixed autoscale for track move delete toggle
Also avoid to always do updateConnectedEditors on project when deleting a curve
This commit is contained in:
@@ -291,18 +291,20 @@ void RimWellLogPlot::calculateAvailableDepthRange()
|
||||
double minTrackDepth = HUGE_VAL;
|
||||
double maxTrackDepth = -HUGE_VAL;
|
||||
|
||||
m_tracks[tIdx]->availableDepthRange(&minTrackDepth, &maxTrackDepth);
|
||||
|
||||
if (minTrackDepth < minDepth)
|
||||
if (m_tracks[tIdx]->isVisible())
|
||||
{
|
||||
minDepth = minTrackDepth;
|
||||
}
|
||||
m_tracks[tIdx]->availableDepthRange(&minTrackDepth, &maxTrackDepth);
|
||||
|
||||
if (maxTrackDepth > maxDepth)
|
||||
{
|
||||
maxDepth = maxTrackDepth;
|
||||
if (minTrackDepth < minDepth)
|
||||
{
|
||||
minDepth = minTrackDepth;
|
||||
}
|
||||
|
||||
if (maxTrackDepth > maxDepth)
|
||||
{
|
||||
maxDepth = maxTrackDepth;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
m_minAvailableDepth = minDepth;
|
||||
|
||||
@@ -80,7 +80,18 @@ void RimWellLogPlotTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
{
|
||||
if (changedField == &m_show)
|
||||
{
|
||||
if (m_wellLogTrackPlotWidget) m_wellLogTrackPlotWidget->setVisible(m_show());
|
||||
if (m_wellLogTrackPlotWidget)
|
||||
{
|
||||
m_wellLogTrackPlotWidget->setVisible(m_show());
|
||||
}
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
this->firstAnchestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot)
|
||||
{
|
||||
wellLogPlot->calculateAvailableDepthRange();
|
||||
wellLogPlot->zoomAllDepth();
|
||||
}
|
||||
}
|
||||
else if (changedField == &m_visibleXRangeMin || changedField == &m_visibleXRangeMax)
|
||||
{
|
||||
@@ -353,3 +364,11 @@ size_t RimWellLogPlotTrack::curveIndex(RimWellLogPlotCurve* curve)
|
||||
{
|
||||
return curves.index(curve);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellLogPlotTrack::isVisible()
|
||||
{
|
||||
return m_show;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
virtual ~RimWellLogPlotTrack();
|
||||
|
||||
void setDescription(const QString& description);
|
||||
|
||||
bool isVisible();
|
||||
void addCurve(RimWellLogPlotCurve* curve);
|
||||
void insertCurve(RimWellLogPlotCurve* curve, size_t index);
|
||||
void removeCurve(RimWellLogPlotCurve* curve);
|
||||
@@ -59,6 +59,7 @@ public:
|
||||
void availableDepthRange(double* minimumDepth, double* maximumDepth);
|
||||
void zoomAllXAndZoomAllDepthOnOwnerPlot();
|
||||
void alignDepthZoomToPlotAndZoomAllX();
|
||||
void zoomAllXAxis();
|
||||
|
||||
RiuWellLogTrackPlot* viewer();
|
||||
|
||||
@@ -73,7 +74,6 @@ protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||
|
||||
private:
|
||||
void zoomAllXAxis();
|
||||
private:
|
||||
caf::PdmField<bool> m_show;
|
||||
caf::PdmField<QString> m_userName;
|
||||
|
||||
Reference in New Issue
Block a user